mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 08:05:29 +08:00
Compare commits
23 Commits
9296b18606
...
1.7.5
Author | SHA1 | Date | |
---|---|---|---|
5fd7c7d10e | |||
83507a6ed5 | |||
789d9164a1 | |||
cb44759978 | |||
04c52b1b25 | |||
b8ef9169b9 | |||
c7de653ba2 | |||
2ddb7e3290 | |||
e8d79e3c7b | |||
bc4510077f | |||
179bc8b21f | |||
8fe4e3b047 | |||
a443f3a9ba | |||
1a0f2afee0 | |||
c9c737f2fc | |||
f0f00b9eba | |||
956f2e0ad0 | |||
ecd13a9cca | |||
17bfff2346 | |||
295dcf02c4 | |||
f701f97756 | |||
2c4cf82f63 | |||
e8c47e0fd8 |
4
.github/workflows/windows-mingw.yml
vendored
4
.github/workflows/windows-mingw.yml
vendored
@ -91,14 +91,14 @@ jobs:
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: zhuzichu520/inno-setup-action@v1.0.1
|
||||
with:
|
||||
filepath: ./action-cli/InstallerScript.iss
|
||||
filepath: ./package/InstallerScript.iss
|
||||
|
||||
- name: uploadRelease
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./action-cli/installer.exe
|
||||
file: ./package/installer.exe
|
||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
4
.github/workflows/windows-qt5.yml
vendored
4
.github/workflows/windows-qt5.yml
vendored
@ -78,14 +78,14 @@ jobs:
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: zhuzichu520/inno-setup-action@v1.0.1
|
||||
with:
|
||||
filepath: ./action-cli/InstallerScript.iss
|
||||
filepath: ./package/InstallerScript.iss
|
||||
|
||||
- name: uploadRelease
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./action-cli/installer.exe
|
||||
file: ./package/installer.exe
|
||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -85,14 +85,14 @@ jobs:
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: zhuzichu520/inno-setup-action@v1.0.1
|
||||
with:
|
||||
filepath: ./action-cli/InstallerScript.iss
|
||||
filepath: ./package/InstallerScript.iss
|
||||
|
||||
- name: uploadRelease
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./action-cli/installer.exe
|
||||
file: ./package/installer.exe
|
||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -36,10 +36,8 @@ bin
|
||||
build
|
||||
cmake-build-*
|
||||
.idea
|
||||
|
||||
package
|
||||
example/Version.h
|
||||
|
||||
action-cli
|
||||
dist
|
||||
|
||||
*.qm
|
@ -28,8 +28,8 @@ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick Svg Network)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network)
|
||||
|
||||
#添加国际化脚本
|
||||
find_program(QT_LUPDATE NAMES lupdate)
|
||||
find_program(QT_LRELEASE NAMES lrelease)
|
||||
find_program(QT_LUPDATE NAMES lupdate lupdate-qt6)
|
||||
find_program(QT_LRELEASE NAMES lrelease lrelease-qt6)
|
||||
file(GLOB TS_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.ts)
|
||||
add_custom_target(Script-UpdateTranslations
|
||||
COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
@ -69,7 +69,7 @@ if (WIN32)
|
||||
)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/.cmake/InstallerScript.iss.in
|
||||
${CMAKE_SOURCE_DIR}/action-cli/InstallerScript.iss
|
||||
${CMAKE_SOURCE_DIR}/package/InstallerScript.iss
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
@ -180,7 +180,6 @@
|
||||
<file>qml/window/PageWindow.qml</file>
|
||||
<file>qml/page/T_StaggeredLayout.qml</file>
|
||||
<file>qml/page/T_Clip.qml</file>
|
||||
<file>qml/page/T_3D.qml</file>
|
||||
<file>qml/page/T_Network.qml</file>
|
||||
<file>qml/page/T_ShortcutPicker.qml</file>
|
||||
<file>qml/chart/T_BarChart.qml</file>
|
||||
|
@ -515,11 +515,6 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<source>3D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="493"/>
|
||||
<source>Test Crash</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -551,104 +546,104 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="83"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="84"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<source>Are you sure you want to exit the program?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="85"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="89"/>
|
||||
<source>Minimize</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<source>Friendly Reminder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="336"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="96"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="103"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="107"/>
|
||||
<source>Open in Separate Window</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="200"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="204"/>
|
||||
<source>Click Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="210"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="214"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="301"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="302"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="303"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<source>Dark Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<source>Here you can switch to night mode.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="309"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<source>Hide Easter eggs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="309"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<source>Try a few more clicks!!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="333"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>Upgrade Tips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source>FluentUI is currently up to date </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source> -- The current app version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source>
|
||||
Now go and download the new version?
|
||||
|
||||
@ -657,17 +652,17 @@ Updated content:
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="341"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="364"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="368"/>
|
||||
<source>The current version is already the latest</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="371"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="375"/>
|
||||
<source>The network is abnormal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1089,46 +1084,6 @@ Updated content:
|
||||
<source>Click to Select a Color - ></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="22"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="23"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="24"/>
|
||||
<source>Color Picker</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="25"/>
|
||||
<source>Edit Color</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="26"/>
|
||||
<source>Red</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="27"/>
|
||||
<source>Green</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="28"/>
|
||||
<source>Blue</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="29"/>
|
||||
<source>Opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_ComboBox</name>
|
||||
@ -1343,22 +1298,22 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
||||
<context>
|
||||
<name>T_Home</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="23"/>
|
||||
<location filename="qml/page/T_Home.qml" line="19"/>
|
||||
<source>FluentUI GitHub</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="24"/>
|
||||
<location filename="qml/page/T_Home.qml" line="20"/>
|
||||
<source>The latest FluentUI controls and styles for your applications.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="32"/>
|
||||
<location filename="qml/page/T_Home.qml" line="28"/>
|
||||
<source>FluentUI Initializr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="33"/>
|
||||
<location filename="qml/page/T_Home.qml" line="29"/>
|
||||
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -1970,26 +1925,6 @@ Some contents...</source>
|
||||
<source>StatusLayout</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="63"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="64"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="65"/>
|
||||
<source>The page went wrong...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="66"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_TabView</name>
|
||||
@ -2394,25 +2329,25 @@ Some contents...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="230"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="183"/>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="238"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="187"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="191"/>
|
||||
<source>Avatar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="242"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="195"/>
|
||||
<source>Address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="234"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>T_Typography</name>
|
||||
|
@ -514,12 +514,11 @@
|
||||
<translation type="unfinished">热加载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<source>3D</source>
|
||||
<translation type="unfinished">3D</translation>
|
||||
<translation type="obsolete">3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="493"/>
|
||||
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
|
||||
<source>Test Crash</source>
|
||||
<translation type="unfinished">测试崩溃</translation>
|
||||
</message>
|
||||
@ -551,104 +550,104 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<source>Dark Mode</source>
|
||||
<translation type="unfinished">夜间模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="83"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished">退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="84"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<source>Are you sure you want to exit the program?</source>
|
||||
<translation type="unfinished">您确定要退出程序吗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="85"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="89"/>
|
||||
<source>Minimize</source>
|
||||
<translation type="unfinished">最小化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<source>Friendly Reminder</source>
|
||||
<translation type="unfinished">友情提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
|
||||
<translation type="unfinished">FluentUI 在托盘中处于隐藏状态,单击托盘以再次激活窗口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="336"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="96"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="103"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="107"/>
|
||||
<source>Open in Separate Window</source>
|
||||
<translation type="unfinished">在独立窗口中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="200"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="204"/>
|
||||
<source>Click Time</source>
|
||||
<translation type="unfinished">点击次数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="210"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="214"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="301"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished">完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="302"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished">下一步</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="303"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished">上一步</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<source>Here you can switch to night mode.</source>
|
||||
<translation type="unfinished">在这里,您可以切换到夜间模式。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="309"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<source>Hide Easter eggs</source>
|
||||
<translation type="unfinished">隐藏彩蛋</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="309"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<source>Try a few more clicks!!</source>
|
||||
<translation type="unfinished">再试几下!!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="333"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>Upgrade Tips</source>
|
||||
<translation type="unfinished">升级提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source>FluentUI is currently up to date </source>
|
||||
<translation type="unfinished">FluentUI 目前最新版本 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source> -- The current app version</source>
|
||||
<translation type="unfinished"> -- 当前应用版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="334"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<source>
|
||||
Now go and download the new version?
|
||||
|
||||
@ -661,17 +660,17 @@ Updated content:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="341"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="364"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="368"/>
|
||||
<source>The current version is already the latest</source>
|
||||
<translation type="unfinished">当前版本已经是最新版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="371"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="375"/>
|
||||
<source>The network is abnormal</source>
|
||||
<translation type="unfinished">网络异常</translation>
|
||||
</message>
|
||||
@ -1113,44 +1112,36 @@ Updated content:
|
||||
<translation type="unfinished">点击选中颜色 - ></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="22"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
<translation type="obsolete">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="23"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
<translation type="obsolete">确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="24"/>
|
||||
<source>Color Picker</source>
|
||||
<translation type="unfinished">颜色选择器</translation>
|
||||
<translation type="obsolete">颜色选择器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="25"/>
|
||||
<source>Edit Color</source>
|
||||
<translation type="unfinished">编辑颜色</translation>
|
||||
<translation type="obsolete">编辑颜色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="26"/>
|
||||
<source>Red</source>
|
||||
<translation type="unfinished">红色</translation>
|
||||
<translation type="obsolete">红色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="27"/>
|
||||
<source>Green</source>
|
||||
<translation type="unfinished">绿色</translation>
|
||||
<translation type="obsolete">绿色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="28"/>
|
||||
<source>Blue</source>
|
||||
<translation type="unfinished">蓝色</translation>
|
||||
<translation type="obsolete">蓝色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_ColorPicker.qml" line="29"/>
|
||||
<source>Opacity</source>
|
||||
<translation type="unfinished">透明度</translation>
|
||||
<translation type="obsolete">透明度</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1393,22 +1384,22 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
||||
<context>
|
||||
<name>T_Home</name>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="23"/>
|
||||
<location filename="qml/page/T_Home.qml" line="19"/>
|
||||
<source>FluentUI GitHub</source>
|
||||
<translation type="unfinished">FluentUI GitHub</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="24"/>
|
||||
<location filename="qml/page/T_Home.qml" line="20"/>
|
||||
<source>The latest FluentUI controls and styles for your applications.</source>
|
||||
<translation type="unfinished">最新的 FluentUI 控件和样式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="32"/>
|
||||
<location filename="qml/page/T_Home.qml" line="28"/>
|
||||
<source>FluentUI Initializr</source>
|
||||
<translation type="unfinished">FluentUI脚手架</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_Home.qml" line="33"/>
|
||||
<location filename="qml/page/T_Home.qml" line="29"/>
|
||||
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
|
||||
<translation type="unfinished">FluentUI 脚手架是一个快速创建项目工具,可帮助您创建和自定义具有各种选项的 Fluent UI 项目</translation>
|
||||
</message>
|
||||
@ -2061,24 +2052,20 @@ Some contents...</source>
|
||||
<translation type="unfinished">状态布局</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="63"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">正在加载...</translation>
|
||||
<translation type="obsolete">正在加载...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="64"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished">空空如也</translation>
|
||||
<translation type="obsolete">空空如也</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="65"/>
|
||||
<source>The page went wrong...</source>
|
||||
<translation type="unfinished">页面出错了...</translation>
|
||||
<translation type="obsolete">页面出错了...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_StatusLayout.qml" line="66"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished">重新加载</translation>
|
||||
<translation type="obsolete">重新加载</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -2504,22 +2491,22 @@ Some contents...</source>
|
||||
<translation type="obsolete">共计选中%1条数据</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="230"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="183"/>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished">标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="242"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="195"/>
|
||||
<source>Address</source>
|
||||
<translation type="unfinished">地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="238"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="191"/>
|
||||
<source>Avatar</source>
|
||||
<translation type="unfinished">头像</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/page/T_TreeView.qml" line="234"/>
|
||||
<location filename="qml/page/T_TreeView.qml" line="187"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished">名称</translation>
|
||||
</message>
|
||||
|
@ -483,12 +483,6 @@ FluObject{
|
||||
FluRouter.navigate("/hotload")
|
||||
}
|
||||
}
|
||||
FluPaneItem{
|
||||
title: qsTr("3D")
|
||||
menuDelegate: paneItemMenu
|
||||
url: "qrc:/example/qml/page/T_3D.qml"
|
||||
onTap: { navigationView.push(url) }
|
||||
}
|
||||
FluPaneItem{
|
||||
title: qsTr("Test Crash")
|
||||
onTapListener: function(){
|
||||
|
@ -1,116 +0,0 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Window 2.15
|
||||
import Qt3D.Core 2.15
|
||||
import Qt3D.Render 2.15
|
||||
import Qt3D.Input 2.12
|
||||
import Qt3D.Extras 2.15
|
||||
import QtQuick.Scene3D 2.15
|
||||
import Qt.labs.platform 1.1
|
||||
import FluentUI 1.0
|
||||
import "../component"
|
||||
|
||||
FluContentPage{
|
||||
|
||||
id:root
|
||||
title:"3D"
|
||||
|
||||
Scene3D{
|
||||
id:scene_3d
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
aspects: ["input", "logic"]
|
||||
cameraAspectRatioMode: Scene3D.AutomaticAspectRatio
|
||||
Entity {
|
||||
Camera {
|
||||
id: camera
|
||||
projectionType: CameraLens.PerspectiveProjection
|
||||
fieldOfView: 22.5
|
||||
aspectRatio: scene_3d.width / scene_3d.height
|
||||
nearPlane: 1
|
||||
farPlane: 1000.0
|
||||
viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
|
||||
upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
|
||||
position: Qt.vector3d( 0.0, 0.0, 15.0 )
|
||||
}
|
||||
FirstPersonCameraController {
|
||||
linearSpeed: 100
|
||||
lookSpeed: 50
|
||||
camera: camera
|
||||
}
|
||||
components: [
|
||||
RenderSettings{
|
||||
activeFrameGraph: ForwardRenderer{
|
||||
clearColor: Qt.rgba(0,0,0,0);
|
||||
camera: camera
|
||||
}
|
||||
},
|
||||
InputSettings{}
|
||||
]
|
||||
Mesh {
|
||||
id: mesh
|
||||
source: "https://zhu-zichu.gitee.io/test.obj"
|
||||
}
|
||||
PhongMaterial {
|
||||
id: material
|
||||
ambient: color_picker.current
|
||||
}
|
||||
Transform{
|
||||
id:transform
|
||||
scale: 1.0
|
||||
translation: Qt.vector3d(0, 0, 0)
|
||||
rotation: fromEulerAngles(0, 0, 0)
|
||||
property real hAngle:0.0
|
||||
NumberAnimation on hAngle{
|
||||
from:0
|
||||
to:360.0
|
||||
duration: 5000
|
||||
loops: Animation.Infinite
|
||||
}
|
||||
matrix:{
|
||||
var m=Qt.matrix4x4();
|
||||
m.rotate(hAngle,Qt.vector3d(0,1,0));
|
||||
m.translate(Qt.vector3d(0,0,0));
|
||||
return m;
|
||||
}
|
||||
}
|
||||
Entity {
|
||||
id: entity
|
||||
components: [mesh, material,transform]
|
||||
}
|
||||
}
|
||||
}
|
||||
ColumnLayout{
|
||||
RowLayout{
|
||||
spacing: 10
|
||||
Layout.topMargin: 20
|
||||
FluText{
|
||||
text:"tintColor:"
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
FluColorPicker{
|
||||
id:color_picker
|
||||
current: "gray"
|
||||
}
|
||||
}
|
||||
|
||||
FluButton{
|
||||
text:"选择obj资源"
|
||||
onClicked: {
|
||||
file_dialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: file_dialog
|
||||
nameFilters: ["Obj files (*.obj)"]
|
||||
folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
|
||||
onAccepted: {
|
||||
var fileUrl = file_dialog.currentFile
|
||||
mesh.source = fileUrl
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -18,16 +18,7 @@ FluScrollablePage{
|
||||
text: qsTr("Click to Select a Color - >")
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
FluColorPicker{
|
||||
cancelText: qsTr("Cancel")
|
||||
okText: qsTr("OK")
|
||||
titleText: qsTr("Color Picker")
|
||||
editText: qsTr("Edit Color")
|
||||
redText: qsTr("Red")
|
||||
greenText: qsTr("Green")
|
||||
blueText: qsTr("Blue")
|
||||
opacityText: qsTr("Opacity")
|
||||
}
|
||||
FluColorPicker{}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
|
@ -12,10 +12,6 @@ FluScrollablePage{
|
||||
animationEnabled: false
|
||||
header: Item{}
|
||||
|
||||
FluentInitializrWindow{
|
||||
id:fluent_Initializr
|
||||
}
|
||||
|
||||
ListModel{
|
||||
id: model_header
|
||||
ListElement{
|
||||
|
@ -24,7 +24,7 @@ FluContentPage {
|
||||
leftMargin: 14
|
||||
}
|
||||
onClicked: {
|
||||
grid_view.model = FluTheme.awesomeList(text_box.text)
|
||||
grid_view.model = FluApp.iconDatas(text_box.text)
|
||||
}
|
||||
}
|
||||
GridView{
|
||||
@ -33,7 +33,7 @@ FluContentPage {
|
||||
cellHeight: 110
|
||||
clip: true
|
||||
boundsBehavior: GridView.StopAtBounds
|
||||
model:FluTheme.awesomeList()
|
||||
model: FluApp.iconDatas()
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
anchors{
|
||||
topMargin: 10
|
||||
|
@ -60,12 +60,8 @@ FluScrollablePage{
|
||||
FluStatusLayout{
|
||||
id:status_view
|
||||
anchors.fill: parent
|
||||
loadingText: qsTr("Loading...")
|
||||
emptyText: qsTr("Empty")
|
||||
errorText: qsTr("The page went wrong...")
|
||||
errorButtonText: qsTr("Reload")
|
||||
onErrorClicked:{
|
||||
showError("Click Reload")
|
||||
status_view.statusMode = FluStatusLayoutType.Loading
|
||||
}
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
@ -13,7 +13,7 @@ FluScrollablePage{
|
||||
|
||||
FluFrame{
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 400
|
||||
Layout.preferredHeight: 408
|
||||
padding: 10
|
||||
|
||||
ColumnLayout{
|
||||
|
@ -10,7 +10,6 @@ FluContentPage {
|
||||
title: qsTr("TreeView")
|
||||
|
||||
|
||||
|
||||
function treeData(){
|
||||
const names = ["孙悟空", "猪八戒", "沙和尚", "唐僧","白骨夫人","金角大王","熊山君","黄风怪","银角大王"]
|
||||
function getRandomName(){
|
||||
@ -29,7 +28,7 @@ FluContentPage {
|
||||
}
|
||||
const dig = (path = '0', level = 5) => {
|
||||
const list = [];
|
||||
for (let i = 0; i < 5; i += 1) {
|
||||
for (let i = 0; i < 4; i += 1) {
|
||||
const key = `${path}-${i}`;
|
||||
const treeNode = {
|
||||
title: key,
|
||||
@ -48,67 +47,6 @@ FluContentPage {
|
||||
return dig();
|
||||
}
|
||||
|
||||
// Row{
|
||||
// id: layout_column
|
||||
// spacing: 12
|
||||
// width: 340
|
||||
// anchors{
|
||||
// top:parent.top
|
||||
// left: parent.left
|
||||
// leftMargin: 10
|
||||
// bottom:parent.bottom
|
||||
// bottomMargin: 20
|
||||
// }
|
||||
// RowLayout{
|
||||
// spacing: 10
|
||||
// FluText{
|
||||
// text: "cellHeight:"
|
||||
// Layout.alignment: Qt.AlignVCenter
|
||||
// }
|
||||
// FluSlider{
|
||||
// id: slider_cell_height
|
||||
// value: 30
|
||||
// from: 30
|
||||
// to:100
|
||||
// }
|
||||
// }
|
||||
// RowLayout{
|
||||
// spacing: 10
|
||||
// FluText{
|
||||
// text: "depthPadding:"
|
||||
// Layout.alignment: Qt.AlignVCenter
|
||||
// }
|
||||
// FluSlider{
|
||||
// id: slider_depth_padding
|
||||
// value: 15
|
||||
// from: 15
|
||||
// to:100
|
||||
// }
|
||||
// }
|
||||
// FluToggleSwitch{
|
||||
// id: switch_showline
|
||||
// text:"showLine"
|
||||
// checked: false
|
||||
// }
|
||||
// FluToggleSwitch{
|
||||
// id: switch_checkable
|
||||
// text:"checkable"
|
||||
// checked: false
|
||||
// }
|
||||
// FluButton{
|
||||
// text: "all expand"
|
||||
// onClicked: {
|
||||
// tree_view.allExpand()
|
||||
// }
|
||||
// }
|
||||
// FluButton{
|
||||
// text: "all collapse"
|
||||
// onClicked: {
|
||||
// tree_view.allCollapse()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Component{
|
||||
id:com_avatar
|
||||
Item{
|
||||
@ -206,11 +144,26 @@ FluContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluButton{
|
||||
text: "print selection model"
|
||||
onClicked: {
|
||||
var printData = []
|
||||
var data = tree_view.selectionModel();
|
||||
console.debug(data.length)
|
||||
for(var i = 0; i <= data.length-1 ; i++){
|
||||
const newObj = Object.assign({}, data[i].data);
|
||||
delete newObj["__parent"];
|
||||
delete newObj["children"];
|
||||
printData.push(newObj)
|
||||
}
|
||||
console.debug(JSON.stringify(printData))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluFrame{
|
||||
FluTreeView{
|
||||
id:tree_view
|
||||
anchors{
|
||||
left: parent.left
|
||||
top: layout_controls.bottom
|
||||
@ -218,36 +171,35 @@ FluContentPage {
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
FluTreeView{
|
||||
id:tree_view
|
||||
anchors.fill: parent
|
||||
cellHeight: slider_cell_height.value
|
||||
showLine: switch_showline.checked
|
||||
checkable:switch_checkable.checked
|
||||
depthPadding: slider_depth_padding.value
|
||||
columnSource:[
|
||||
{
|
||||
title: qsTr("Title"),
|
||||
dataIndex: 'title',
|
||||
width: 300
|
||||
},{
|
||||
title: qsTr("Name"),
|
||||
dataIndex: 'name',
|
||||
width: 100
|
||||
},{
|
||||
title: qsTr("Avatar"),
|
||||
dataIndex: 'avatar',
|
||||
width: 100
|
||||
},{
|
||||
title: qsTr("Address"),
|
||||
dataIndex: 'address',
|
||||
width: 200
|
||||
},
|
||||
]
|
||||
Component.onCompleted: {
|
||||
var data = treeData()
|
||||
dataSource = data
|
||||
}
|
||||
cellHeight: slider_cell_height.value
|
||||
showLine: switch_showline.checked
|
||||
checkable:switch_checkable.checked
|
||||
depthPadding: slider_depth_padding.value
|
||||
onCurrentChanged: {
|
||||
showInfo(current.data.title)
|
||||
}
|
||||
columnSource:[
|
||||
{
|
||||
title: qsTr("Title"),
|
||||
dataIndex: 'title',
|
||||
width: 300
|
||||
},{
|
||||
title: qsTr("Name"),
|
||||
dataIndex: 'name',
|
||||
width: 100
|
||||
},{
|
||||
title: qsTr("Avatar"),
|
||||
dataIndex: 'avatar',
|
||||
width: 100
|
||||
},{
|
||||
title: qsTr("Address"),
|
||||
dataIndex: 'address',
|
||||
width: 200
|
||||
},
|
||||
]
|
||||
Component.onCompleted: {
|
||||
var data = treeData()
|
||||
dataSource = data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ FluWindowDialog {
|
||||
showError(message)
|
||||
}
|
||||
function onSuccess(path){
|
||||
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
||||
FluTools.showFileInFolder(path)
|
||||
window.close()
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ FluWindow {
|
||||
title: "FluentUI"
|
||||
width: 1000
|
||||
height: 680
|
||||
minimumWidth: 520
|
||||
minimumWidth: 1000
|
||||
minimumHeight: 200
|
||||
launchMode: FluWindowType.SingleTask
|
||||
fitsAppBarWindows: true
|
||||
@ -28,6 +28,10 @@ FluWindow {
|
||||
z:7
|
||||
}
|
||||
|
||||
FluentInitializrWindow{
|
||||
id:fluent_Initializr
|
||||
}
|
||||
|
||||
FluEvent{
|
||||
name: "checkUpdate"
|
||||
onTriggered: {
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
|
||||
void paint(QPainter *painter) override;
|
||||
|
||||
Q_INVOKABLE [[maybe_unused]] void start(int w, int h, const QPoint ¢er, int radius);
|
||||
[[maybe_unused]] Q_INVOKABLE void start(int w, int h, const QPoint ¢er, int radius);
|
||||
|
||||
Q_SIGNAL void imageChanged();
|
||||
|
||||
|
@ -97,5 +97,5 @@ void InitializrHelper::copyFile(const QString &source, const QString &dest) {
|
||||
copyFile(":/example/res/template/src/qml.qrc.in", projectDir.filePath("src/qml.qrc"));
|
||||
copyFile(":/example/res/template/src/logo.ico.in", projectDir.filePath("src/logo.ico"));
|
||||
copyFile(":/example/res/template/src/README.md.in", projectDir.filePath("src/README.md"));
|
||||
return this->success(projectPath);
|
||||
return this->success(projectPath+"/CMakeLists.txt");
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ SINGLETON(InitializrHelper)
|
||||
|
||||
~InitializrHelper() override;
|
||||
|
||||
Q_INVOKABLE [[maybe_unused]] void generate(const QString &name, const QString &path);
|
||||
[[maybe_unused]] Q_INVOKABLE void generate(const QString &name, const QString &path);
|
||||
|
||||
Q_SIGNAL void error(const QString &message);
|
||||
|
||||
|
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
QGuiApplication::setOrganizationName("ZhuZiChu");
|
||||
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
||||
QGuiApplication::setApplicationName("FluentUI");
|
||||
QGuiApplication::setApplicationDisplayName("FluentUI Exmaple");
|
||||
QGuiApplication::setApplicationDisplayName("FluentUI Example");
|
||||
QGuiApplication::setApplicationVersion(APPLICATION_VERSION);
|
||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||
SettingsHelper::getInstance()->init(argv);
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "FluAccentColor.h"
|
||||
|
||||
FluAccentColor::FluAccentColor(QObject *parent) : QObject{parent} {
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <QClipboard>
|
||||
#include <QTranslator>
|
||||
#include <utility>
|
||||
#include "FluentIconDef.h"
|
||||
|
||||
FluApp::FluApp(QObject *parent) : QObject{parent} {
|
||||
_useSystemAppBar = false;
|
||||
@ -30,3 +31,19 @@ void FluApp::init(QObject *target, QLocale locale) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[[maybe_unused]] QJsonArray FluApp::iconDatas(const QString &keyword) {
|
||||
QJsonArray arr;
|
||||
QMetaEnum enumType = Fluent_Icons::staticMetaObject.enumerator(Fluent_Icons::staticMetaObject.indexOfEnumerator("Fluent_IconType"));
|
||||
for (int i = 0; i <= enumType.keyCount() - 1; ++i) {
|
||||
QString name = enumType.key(i);
|
||||
int icon = enumType.value(i);
|
||||
if (keyword.isEmpty() || name.contains(keyword)) {
|
||||
QJsonObject obj;
|
||||
obj.insert("name", name);
|
||||
obj.insert("icon", icon);
|
||||
arr.append(obj);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QQmlEngine>
|
||||
#include <QTranslator>
|
||||
#include <QQuickWindow>
|
||||
#include <QJsonArray>
|
||||
#include "stdafx.h"
|
||||
#include "singleton.h"
|
||||
|
||||
@ -35,7 +36,9 @@ SINGLETON(FluApp)
|
||||
|
||||
Q_INVOKABLE void init(QObject *target, QLocale locale = QLocale::system());
|
||||
|
||||
[[maybe_unused]] Q_INVOKABLE static QJsonArray iconDatas(const QString &keyword = "");
|
||||
|
||||
private:
|
||||
QQmlEngine *_engine{};
|
||||
QTranslator *_translator = nullptr;
|
||||
};
|
||||
};
|
||||
|
@ -109,7 +109,7 @@ FluColors::FluColors(QObject *parent) : QObject{parent} {
|
||||
_Green = green;
|
||||
}
|
||||
|
||||
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor& primaryColor) {
|
||||
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor &primaryColor) {
|
||||
auto accentColor = new FluAccentColor(this);
|
||||
accentColor->normal(primaryColor);
|
||||
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9));
|
||||
|
@ -55,7 +55,7 @@ private:
|
||||
public:
|
||||
SINGLETON(FluColors)
|
||||
|
||||
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor& primaryColor);
|
||||
[[maybe_unused]] Q_INVOKABLE FluAccentColor *createAccentColor(const QColor &primaryColor);
|
||||
|
||||
static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
};
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
#include <QDateTime>
|
||||
#include "FluTools.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#pragma comment (lib, "user32.lib")
|
||||
@ -13,6 +14,7 @@
|
||||
#include <windowsx.h>
|
||||
#include <dwmapi.h>
|
||||
|
||||
|
||||
static inline QByteArray qtNativeEventType() {
|
||||
static const auto result = "windows_generic_MSG";
|
||||
return result;
|
||||
@ -55,6 +57,7 @@ FluFrameless::FluFrameless(QQuickItem *parent) : QQuickItem{parent} {
|
||||
_closeButton = nullptr;
|
||||
_topmost = false;
|
||||
_disabled = false;
|
||||
_isWindows11OrGreater = FluTools::getInstance()->isWindows11OrGreater();
|
||||
}
|
||||
|
||||
FluFrameless::~FluFrameless() = default;
|
||||
@ -67,6 +70,8 @@ void FluFrameless::componentComplete() {
|
||||
if (_disabled) {
|
||||
return;
|
||||
}
|
||||
int w = window()->width();
|
||||
int h = window()->height();
|
||||
_current = window()->winId();
|
||||
window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
@ -107,6 +112,12 @@ void FluFrameless::componentComplete() {
|
||||
::RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
|
||||
});
|
||||
#endif
|
||||
h = qRound(h + _appbar->height());
|
||||
if (_fixSize) {
|
||||
window()->setMaximumSize(QSize(w, h));
|
||||
window()->setMinimumSize(QSize(w, h));
|
||||
}
|
||||
window()->resize(QSize(w, h));
|
||||
connect(this, &FluFrameless::topmostChanged, this, [this] {
|
||||
_setWindowTopmost(topmost());
|
||||
});
|
||||
@ -135,7 +146,7 @@ void FluFrameless::componentComplete() {
|
||||
auto *wp = reinterpret_cast<WINDOWPOS *>(lParam);
|
||||
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) {
|
||||
wp->flags |= SWP_NOCOPYBITS;
|
||||
*result = ::DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||
*result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(::DefWindowProcW(hwnd, uMsg, wParam, lParam));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -147,12 +158,15 @@ void FluFrameless::componentComplete() {
|
||||
const LONG originalBottom = clientRect->bottom;
|
||||
const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam);
|
||||
if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
|
||||
*result = hitTestResult;
|
||||
*result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(hitTestResult);
|
||||
return true;
|
||||
}
|
||||
int offsetSize;
|
||||
bool isMaximum = ::IsZoomed(hwnd);
|
||||
offsetXY = QPoint(abs(clientRect->left - originalLeft), abs(clientRect->top - originalTop));
|
||||
auto _offsetXY = QPoint(abs(clientRect->left - originalLeft), abs(clientRect->top - originalTop));
|
||||
if (_offsetXY.x() != 0) {
|
||||
offsetXY = _offsetXY;
|
||||
}
|
||||
if (isMaximum || _isFullScreen()) {
|
||||
offsetSize = 0;
|
||||
} else {
|
||||
@ -161,32 +175,34 @@ void FluFrameless::componentComplete() {
|
||||
if (!isCompositionEnabled()) {
|
||||
offsetSize = 0;
|
||||
}
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
clientRect->top = originalTop + offsetSize;
|
||||
clientRect->bottom = originalBottom - offsetSize;
|
||||
clientRect->left = originalLeft + offsetSize;
|
||||
clientRect->right = originalRight - offsetSize;
|
||||
#else
|
||||
if (!isMaximum) {
|
||||
clientRect->top = originalTop + offsetSize;
|
||||
clientRect->bottom = originalBottom - offsetSize;
|
||||
clientRect->left = originalLeft + offsetSize;
|
||||
clientRect->right = originalRight - offsetSize;
|
||||
}
|
||||
#else
|
||||
clientRect->top = originalTop + offsetSize;
|
||||
clientRect->bottom = originalBottom - offsetSize;
|
||||
clientRect->left = originalLeft + offsetSize;
|
||||
clientRect->right = originalRight - offsetSize;
|
||||
#endif
|
||||
_setMaximizeHovered(false);
|
||||
*result = WVR_REDRAW;
|
||||
return true;
|
||||
} else if (uMsg == WM_NCHITTEST) {
|
||||
if (_hitMaximizeButton()) {
|
||||
if (*result == HTNOWHERE) {
|
||||
*result = HTZOOM;
|
||||
if (_isWindows11OrGreater) {
|
||||
if (_hitMaximizeButton()) {
|
||||
if (*result == HTNOWHERE) {
|
||||
*result = HTZOOM;
|
||||
}
|
||||
_setMaximizeHovered(true);
|
||||
return true;
|
||||
}
|
||||
_setMaximizeHovered(true);
|
||||
return true;
|
||||
_setMaximizeHovered(false);
|
||||
_setMaximizePressed(false);
|
||||
}
|
||||
_setMaximizeHovered(false);
|
||||
_setMaximizePressed(false);
|
||||
*result = 0;
|
||||
POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
|
||||
POINT nativeLocalPos = nativeGlobalPos;
|
||||
@ -228,14 +244,14 @@ void FluFrameless::componentComplete() {
|
||||
}
|
||||
*result = HTCLIENT;
|
||||
return true;
|
||||
} else if (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN) {
|
||||
} else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN)) {
|
||||
if (_hitMaximizeButton()) {
|
||||
QMouseEvent event = QMouseEvent(QEvent::MouseButtonPress, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
||||
QGuiApplication::sendEvent(_maximizeButton, &event);
|
||||
_setMaximizePressed(true);
|
||||
return true;
|
||||
}
|
||||
} else if (uMsg == WM_NCLBUTTONUP || uMsg == WM_NCRBUTTONUP) {
|
||||
} else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONUP || uMsg == WM_NCRBUTTONUP)) {
|
||||
if (_hitMaximizeButton()) {
|
||||
QMouseEvent event = QMouseEvent(QEvent::MouseButtonRelease, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
||||
QGuiApplication::sendEvent(_maximizeButton, &event);
|
||||
@ -246,19 +262,31 @@ void FluFrameless::componentComplete() {
|
||||
*result = FALSE;
|
||||
return true;
|
||||
} else if (uMsg == WM_NCACTIVATE) {
|
||||
*result = ::DefWindowProcW(hwnd, WM_NCACTIVATE, wParam, -1);
|
||||
*result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(::DefWindowProcW(hwnd, WM_NCACTIVATE, wParam, -1));
|
||||
return true;
|
||||
} else if (uMsg == WM_GETMINMAXINFO) {
|
||||
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
minmaxInfo->ptMaxPosition.x = 0;
|
||||
minmaxInfo->ptMaxPosition.y = 0;
|
||||
minmaxInfo->ptMaxSize.x = 0;
|
||||
minmaxInfo->ptMaxSize.y = 0;
|
||||
return false;
|
||||
#else
|
||||
auto pixelRatio = window()->devicePixelRatio();
|
||||
auto geometry = window()->screen()->availableGeometry();
|
||||
RECT rect;
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
|
||||
if (!_fixSize) {
|
||||
minmaxInfo->ptMinTrackSize.x = qRound(window()->minimumWidth() * pixelRatio + offsetXY.x());
|
||||
minmaxInfo->ptMinTrackSize.y = qRound(window()->minimumHeight() * pixelRatio + offsetXY.y() + _appbar->height() * pixelRatio);
|
||||
}
|
||||
minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x();
|
||||
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
|
||||
minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;
|
||||
minmaxInfo->ptMaxSize.y = qRound(geometry.height() * pixelRatio) + offsetXY.y() * 2;
|
||||
return false;
|
||||
return true;
|
||||
#endif
|
||||
} else if (uMsg == WM_NCRBUTTONDOWN) {
|
||||
if (wParam == HTCAPTION) {
|
||||
_showSystemMenu(QCursor::pos());
|
||||
@ -273,9 +301,11 @@ void FluFrameless::componentComplete() {
|
||||
} else if (uMsg == WM_SYSCOMMAND) {
|
||||
if (wParam == SC_MINIMIZE) {
|
||||
if (window()->transientParent()) {
|
||||
window()->transientParent()->showMinimized();
|
||||
auto _hwnd = reinterpret_cast<HWND>(window()->transientParent()->winId());
|
||||
::ShowWindow(_hwnd, 2);
|
||||
} else {
|
||||
window()->showMinimized();
|
||||
auto _hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
::ShowWindow(_hwnd, 2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -387,16 +417,21 @@ void FluFrameless::showMaximized() {
|
||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
::ShowWindow(hwnd, 3);
|
||||
#else
|
||||
window()->showMaximized();
|
||||
window()->setVisibility(QQuickWindow::Maximized);
|
||||
#endif
|
||||
}
|
||||
|
||||
[[maybe_unused]] void FluFrameless::showMinimized() {
|
||||
window()->showMinimized();
|
||||
#ifdef Q_OS_WIN
|
||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
::ShowWindow(hwnd, 2);
|
||||
#else
|
||||
window()->setVisibility(QQuickWindow::Minimized);
|
||||
#endif
|
||||
}
|
||||
|
||||
void FluFrameless::showNormal() {
|
||||
window()->showNormal();
|
||||
window()->setVisibility(QQuickWindow::Windowed);
|
||||
}
|
||||
|
||||
void FluFrameless::setHitTestVisible(QQuickItem *val) {
|
||||
@ -405,7 +440,6 @@ void FluFrameless::setHitTestVisible(QQuickItem *val) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FluFrameless::_setWindowTopmost(bool topmost) {
|
||||
#ifdef Q_OS_WIN
|
||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <QObject>
|
||||
#include <QQuickItem>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#include <QQmlProperty>
|
||||
#include "stdafx.h"
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
@ -72,5 +73,6 @@ private:
|
||||
int _edges = 0;
|
||||
int _margins = 8;
|
||||
quint64 _clickTimer = 0;
|
||||
bool _isWindows11OrGreater = false;
|
||||
QList<QPointer<QQuickItem>> _hitTestList;
|
||||
};
|
||||
|
@ -30,4 +30,4 @@ public:
|
||||
SINGLETON(FluTextStyle)
|
||||
|
||||
static FluTextStyle *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
};
|
||||
};
|
||||
|
@ -3,8 +3,8 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QPalette>
|
||||
#include <QImage>
|
||||
#include <QThreadPool>
|
||||
#include "Def.h"
|
||||
#include "FluentIconDef.h"
|
||||
#include "FluColors.h"
|
||||
#include "FluTools.h"
|
||||
|
||||
@ -24,15 +24,15 @@ FluTheme::FluTheme(QObject *parent) : QObject{parent} {
|
||||
_blurBehindWindowEnabled = false;
|
||||
QGuiApplication::instance()->installEventFilter(this);
|
||||
refreshColors();
|
||||
updateDesktopImage();
|
||||
connect(this, &FluTheme::darkModeChanged, this, [=] {
|
||||
Q_EMIT darkChanged();
|
||||
});
|
||||
connect(this, &FluTheme::darkChanged, this, [=] { refreshColors(); });
|
||||
connect(this, &FluTheme::accentColorChanged, this, [=] { refreshColors(); });
|
||||
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
||||
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path) {
|
||||
Q_EMIT desktopImagePathChanged();
|
||||
});
|
||||
connect(this, &FluTheme::blurBehindWindowEnabledChanged, this, [=] { checkUpdateDesktopImage(); });
|
||||
startTimer(1000);
|
||||
}
|
||||
|
||||
@ -47,8 +47,8 @@ void FluTheme::refreshColors() {
|
||||
fontSecondaryColor(isDark ? QColor(222, 222, 222, 255) : QColor(102, 102, 102, 255));
|
||||
fontTertiaryColor(isDark ? QColor(200, 200, 200, 255) : QColor(153, 153, 153, 255));
|
||||
itemNormalColor(isDark ? QColor(255, 255, 255, 0) : QColor(0, 0, 0, 0));
|
||||
frameColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.12)) : QColor(0, 0, 0, qRound(255 * 0.09)));
|
||||
frameActiveColor(isDark ? QColor(32, 32, 32, qRound(255 * 0.8)) : QColor(255, 255, 255, qRound(255 * 0.6)));
|
||||
frameColor(isDark ? QColor(56, 56, 56, qRound(255 * 0.8)) : QColor(243, 243, 243, qRound(255 * 0.8)));
|
||||
frameActiveColor(isDark ? QColor(48, 48, 48, qRound(255 * 0.8)) : QColor(255, 255, 255, qRound(255 * 0.8)));
|
||||
itemHoverColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.06)) : QColor(0, 0, 0, qRound(255 * 0.03)));
|
||||
itemPressColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.09)) : QColor(0, 0, 0, qRound(255 * 0.06)));
|
||||
itemCheckColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.12)) : QColor(0, 0, 0, qRound(255 * 0.09)));
|
||||
@ -64,22 +64,6 @@ bool FluTheme::eventFilter(QObject *, QEvent *event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
[[maybe_unused]] QJsonArray FluTheme::awesomeList(const QString &keyword) {
|
||||
QJsonArray arr;
|
||||
QMetaEnum enumType = Fluent_Icons::staticMetaObject.enumerator(Fluent_Icons::staticMetaObject.indexOfEnumerator("Fluent_IconType"));
|
||||
for (int i = 0; i <= enumType.keyCount() - 1; ++i) {
|
||||
QString name = enumType.key(i);
|
||||
int icon = enumType.value(i);
|
||||
if (keyword.isEmpty() || name.contains(keyword)) {
|
||||
QJsonObject obj;
|
||||
obj.insert("name", name);
|
||||
obj.insert("icon", icon);
|
||||
arr.append(obj);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
bool FluTheme::dark() const {
|
||||
if (_darkMode == FluThemeType::DarkMode::Dark) {
|
||||
return true;
|
||||
@ -90,18 +74,24 @@ bool FluTheme::dark() const {
|
||||
}
|
||||
}
|
||||
|
||||
void FluTheme::updateDesktopImage(){
|
||||
auto path = FluTools::getInstance()->getWallpaperFilePath();
|
||||
if(_desktopImagePath != path){
|
||||
if(!_desktopImagePath.isEmpty()){
|
||||
_watcher.removePath(_desktopImagePath);
|
||||
}
|
||||
desktopImagePath(path);
|
||||
_watcher.addPath(path);
|
||||
void FluTheme::checkUpdateDesktopImage() {
|
||||
if (!_blurBehindWindowEnabled) {
|
||||
return;
|
||||
}
|
||||
QThreadPool::globalInstance()->start([=]() {
|
||||
_mutex.lock();
|
||||
auto path = FluTools::getInstance()->getWallpaperFilePath();
|
||||
if (_desktopImagePath != path) {
|
||||
if (!_desktopImagePath.isEmpty()) {
|
||||
_watcher.removePath(_desktopImagePath);
|
||||
}
|
||||
desktopImagePath(path);
|
||||
_watcher.addPath(path);
|
||||
}
|
||||
_mutex.unlock();
|
||||
});
|
||||
}
|
||||
|
||||
void FluTheme::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
updateDesktopImage();
|
||||
void FluTheme::timerEvent(QTimerEvent *event) {
|
||||
checkUpdateDesktopImage();
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef FLUTHEME_H
|
||||
#define FLUTHEME_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QtQml/qqml.h>
|
||||
@ -8,6 +7,7 @@
|
||||
#include <QColor>
|
||||
#include <QTimer>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QMutex>
|
||||
#include "FluAccentColor.h"
|
||||
#include "stdafx.h"
|
||||
#include "singleton.h"
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
class FluTheme : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
|
||||
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
|
||||
Q_PROPERTY_AUTO_P(FluAccentColor*, accentColor);
|
||||
Q_PROPERTY_AUTO(QColor, primaryColor);
|
||||
Q_PROPERTY_AUTO(QColor, backgroundColor);
|
||||
@ -48,19 +48,15 @@ private:
|
||||
|
||||
void refreshColors();
|
||||
|
||||
void updateBackgroundMainColor();
|
||||
|
||||
protected:
|
||||
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
|
||||
void updateDesktopImage();
|
||||
void checkUpdateDesktopImage();
|
||||
|
||||
public:
|
||||
SINGLETON(FluTheme)
|
||||
|
||||
[[maybe_unused]] Q_INVOKABLE static QJsonArray awesomeList(const QString &keyword = "");
|
||||
|
||||
Q_SIGNAL void darkChanged();
|
||||
|
||||
static FluTheme *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
||||
@ -70,6 +66,5 @@ SINGLETON(FluTheme)
|
||||
private:
|
||||
bool _systemDark;
|
||||
QFileSystemWatcher _watcher;
|
||||
};
|
||||
|
||||
#endif // FLUTHEME_H
|
||||
QMutex _mutex;
|
||||
};
|
@ -281,6 +281,18 @@ QString FluTools::getWallpaperFilePath() {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
#elif defined(Q_OS_MACOS)
|
||||
QProcess process;
|
||||
QStringList args;
|
||||
args << "-e";
|
||||
args << R"(tell application "Finder" to get POSIX path of (desktop picture as alias))";
|
||||
process.start("osascript", args);
|
||||
process.waitForFinished();
|
||||
QByteArray result = process.readAllStandardOutput().trimmed();
|
||||
if(result.isEmpty()){
|
||||
return "/System/Library/CoreServices/DefaultDesktop.heic";
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
return {};
|
||||
#endif
|
||||
|
@ -113,15 +113,7 @@ void FluTreeModel::checkRow(int row, bool checked) {
|
||||
itemData->_checked = checked;
|
||||
}
|
||||
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0));
|
||||
QList<FluTreeNode *> data;
|
||||
foreach (auto item, _dataSource) {
|
||||
if (!item->hasChildren()) {
|
||||
if (item->_checked) {
|
||||
data.append(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
selectionModel(data);
|
||||
|
||||
}
|
||||
|
||||
void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
|
||||
@ -272,3 +264,13 @@ void FluTreeModel::allCollapse() {
|
||||
_rows = _root->_children;
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
QVariant FluTreeModel::selectionModel(){
|
||||
QList<FluTreeNode *> data;
|
||||
foreach (auto item, _dataSource) {
|
||||
if (item->checked()) {
|
||||
data.append(item);
|
||||
}
|
||||
}
|
||||
return QVariant::fromValue(data);
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ public:
|
||||
class FluTreeModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY_AUTO(int, dataSourceSize)
|
||||
Q_PROPERTY_AUTO(QList<FluTreeNode *>, selectionModel)
|
||||
Q_PROPERTY_AUTO(QList<QVariantMap>, columnSource)
|
||||
QML_NAMED_ELEMENT(FluTreeModel)
|
||||
QML_ADDED_IN_MINOR_VERSION(1)
|
||||
@ -141,6 +140,8 @@ public:
|
||||
|
||||
Q_INVOKABLE void allCollapse();
|
||||
|
||||
Q_INVOKABLE QVariant selectionModel();
|
||||
|
||||
private:
|
||||
QList<FluTreeNode *> _rows;
|
||||
QList<FluTreeNode *> _dataSource;
|
||||
|
@ -8,7 +8,7 @@ Item {
|
||||
property real tintOpacity: 0.65
|
||||
property real luminosity: 0.01
|
||||
property real noiseOpacity: 0.02
|
||||
property var target
|
||||
property alias target : effect_source.sourceItem
|
||||
property int blurRadius: 32
|
||||
property rect targetRect: Qt.rect(control.x, control.y, control.width,control.height)
|
||||
ShaderEffectSource {
|
||||
@ -16,7 +16,6 @@ Item {
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
sourceRect: control.targetRect
|
||||
sourceItem: control.target
|
||||
}
|
||||
FastBlur {
|
||||
id: fast_blur
|
||||
|
@ -14,7 +14,7 @@ Rectangle{
|
||||
property string closeText : qsTr("Close")
|
||||
property string stayTopText : qsTr("Sticky on Top")
|
||||
property string stayTopCancelText : qsTr("Sticky on Top cancelled")
|
||||
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||
property color textColor: FluTheme.fontPrimaryColor
|
||||
property color minimizeNormalColor: FluTheme.itemNormalColor
|
||||
property color minimizeHoverColor: FluTheme.itemHoverColor
|
||||
property color minimizePressColor: FluTheme.itemPressColor
|
||||
@ -22,7 +22,7 @@ Rectangle{
|
||||
property color maximizeHoverColor: FluTheme.itemHoverColor
|
||||
property color maximizePressColor: FluTheme.itemPressColor
|
||||
property color closeNormalColor: Qt.rgba(0,0,0,0)
|
||||
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
|
||||
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
|
||||
property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
|
||||
property bool showDark: false
|
||||
property bool showClose: true
|
||||
|
@ -59,12 +59,8 @@ FluTextBox{
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
contentItem: FluRectangle{
|
||||
radius: [4,4,4,4]
|
||||
FluShadow{
|
||||
radius: 4
|
||||
}
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
contentItem: FluClip{
|
||||
radius: [5,5,5,5]
|
||||
ListView{
|
||||
id:list_view
|
||||
anchors.fill: parent
|
||||
@ -97,10 +93,13 @@ FluTextBox{
|
||||
radius:4
|
||||
}
|
||||
color: {
|
||||
if(hovered){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
if(pressed){
|
||||
return FluTheme.itemPressColor
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
if(hovered){
|
||||
return FluTheme.itemHoverColor
|
||||
}
|
||||
return FluTheme.itemNormalColor
|
||||
}
|
||||
}
|
||||
contentItem: FluText{
|
||||
@ -112,22 +111,28 @@ FluTextBox{
|
||||
}
|
||||
}
|
||||
}
|
||||
background: Item{
|
||||
id:container
|
||||
background:Rectangle{
|
||||
id: rect_background
|
||||
implicitWidth: control.width
|
||||
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8)
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
onTextChanged: {
|
||||
d.loadData()
|
||||
if(d.flagVisible){
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.implicitHeight){
|
||||
if(d.window.height>pos.y+control.height+rect_background.implicitHeight){
|
||||
control_popup.y = control.height
|
||||
} else if(pos.y>container.implicitHeight){
|
||||
control_popup.y = -container.implicitHeight
|
||||
} else if(pos.y>rect_background.implicitHeight){
|
||||
control_popup.y = -rect_background.implicitHeight
|
||||
} else {
|
||||
control_popup.y = d.window.height-(pos.y+container.implicitHeight)
|
||||
control_popup.y = d.window.height-(pos.y+rect_background.implicitHeight) - 1
|
||||
}
|
||||
control_popup.visible = true
|
||||
}
|
||||
|
@ -57,12 +57,12 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: {
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/255,1) : Qt.rgba(92/255,92/255,92/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
||||
}
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,16 +13,15 @@ Button{
|
||||
property color current : Qt.rgba(1,1,1,1)
|
||||
signal accepted()
|
||||
property int colorHandleRadius: 8
|
||||
property string cancelText: "取消"
|
||||
property string okText: "确定"
|
||||
property string titleText: "颜色选择器"
|
||||
property string editText: "编辑颜色"
|
||||
property string redText: "红色"
|
||||
property string greenText: "绿色"
|
||||
property string blueText: "蓝色"
|
||||
property string opacityText: "透明度"
|
||||
background:
|
||||
Rectangle{
|
||||
property string cancelText: qsTr("Cancel")
|
||||
property string okText: qsTr("OK")
|
||||
property string titleText: qsTr("Color Picker")
|
||||
property string editText: qsTr("Edit Color")
|
||||
property string redText: qsTr("Red")
|
||||
property string greenText: qsTr("Green")
|
||||
property string blueText: qsTr("Blue")
|
||||
property string opacityText: qsTr("Opacity")
|
||||
background: Rectangle{
|
||||
id:layout_color
|
||||
radius: 5
|
||||
color:"#00000000"
|
||||
|
@ -134,10 +134,9 @@ T.ComboBox {
|
||||
}
|
||||
}
|
||||
background:Rectangle{
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(249/255,249/255,249/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
border.width: 1
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 5
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
|
||||
FluButton {
|
||||
property bool showYear: true
|
||||
property var current
|
||||
@ -96,8 +95,6 @@ FluButton {
|
||||
Menu{
|
||||
id:popup
|
||||
modal: true
|
||||
width: container.width
|
||||
height: container.height
|
||||
Overlay.modal: Item {}
|
||||
enter: Transition {
|
||||
reversible: true
|
||||
@ -116,227 +113,220 @@ FluButton {
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
background:Item{
|
||||
background:Rectangle{
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 4
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
contentItem: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
id:container
|
||||
radius: 4
|
||||
width: 300
|
||||
height: 340
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
FluShadow{
|
||||
radius: 4
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 300
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
id:container
|
||||
implicitHeight: 340
|
||||
implicitWidth: 300
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 280
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height: 38
|
||||
width: getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
Rectangle{
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_year.text = model
|
||||
list_view_2.model = generateMonthArray(1,12)
|
||||
text_month.text = list_view_2.model[list_view_2.currentIndex]
|
||||
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
}
|
||||
if(type === 1){
|
||||
text_month.text = model
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
|
||||
}
|
||||
if(type === 2){
|
||||
text_day.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
}
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_year.text = model
|
||||
list_view_2.model = generateMonthArray(1,12)
|
||||
text_month.text = list_view_2.model[list_view_2.currentIndex]
|
||||
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
}
|
||||
if(type === 1){
|
||||
text_month.text = model
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
|
||||
}
|
||||
if(type === 2){
|
||||
text_day.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
width: 100
|
||||
height: parent.height
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
model: generateYearArray(1924,2048)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
visible: showYear
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
width: showYear ? 100 : 150
|
||||
height: parent.height
|
||||
clip: true
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
width: showYear ? 100 : 150
|
||||
height: parent.height
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
model: generateYearArray(1924,2048)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
visible: showYear
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 1
|
||||
anchors.top: layout_content.bottom
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
visible: showYear
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
Layout.preferredWidth: showYear ? 99 : 150
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
clip: true
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 40
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
ListView{
|
||||
id:list_view_3
|
||||
Layout.preferredWidth: showYear ? 99 : 150
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 60
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
radius: 5
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const year = text_year.text
|
||||
const month = text_month.text
|
||||
const day = text_day.text
|
||||
const date = new Date()
|
||||
date.setFullYear(parseInt(year));
|
||||
date.setMonth(parseInt(month) - 1);
|
||||
date.setDate(parseInt(day));
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const year = text_year.text
|
||||
const month = text_month.text
|
||||
const day = text_day.text
|
||||
const date = new Date()
|
||||
date.setFullYear(parseInt(year));
|
||||
date.setMonth(parseInt(month) - 1);
|
||||
date.setDate(parseInt(day));
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -361,7 +351,7 @@ FluButton {
|
||||
text_day.text = day
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.height){
|
||||
popup.y = control.height
|
||||
popup.y = control.height-1
|
||||
} else if(pos.y>container.height){
|
||||
popup.y = -container.height
|
||||
} else {
|
||||
|
@ -19,16 +19,20 @@ FluButton {
|
||||
}
|
||||
iconColor:control.textColor
|
||||
}
|
||||
Item{
|
||||
id: d
|
||||
property var window: Window.window
|
||||
}
|
||||
onClicked: {
|
||||
if(menu.count !==0){
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
var containerHeight = menu.count*36
|
||||
if(window.height>pos.y+control.height+containerHeight){
|
||||
if(d.window.height>pos.y+control.height+containerHeight){
|
||||
menu.y = control.height
|
||||
}else if(pos.y>containerHeight){
|
||||
menu.y = -containerHeight
|
||||
}else{
|
||||
menu.y = window.height-(pos.y+containerHeight)
|
||||
menu.y = d.window.height-(pos.y+containerHeight)
|
||||
}
|
||||
menu.open()
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ T.Menu {
|
||||
background: Rectangle {
|
||||
implicitWidth: 150
|
||||
implicitHeight: 36
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(252/255,252/255,252/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
border.width: 1
|
||||
radius: 5
|
||||
FluShadow{}
|
||||
|
@ -8,11 +8,11 @@ Item{
|
||||
id:control
|
||||
default property alias content: container.data
|
||||
property int statusMode: FluStatusLayoutType.Loading
|
||||
property string loadingText:"正在加载..."
|
||||
property string emptyText: "空空如也"
|
||||
property string errorText: "页面出错了.."
|
||||
property string errorButtonText: "重新加载"
|
||||
property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
property string loadingText: qsTr("Loading...")
|
||||
property string emptyText: qsTr("Empty")
|
||||
property string errorText: qsTr("Error")
|
||||
property string errorButtonText: qsTr("Reload")
|
||||
property color color: Qt.rgba(0,0,0,0)
|
||||
signal errorClicked
|
||||
property Component loadingItem : com_loading
|
||||
property Component emptyItem : com_empty
|
||||
|
@ -1,4 +1,5 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import Qt.labs.qmlmodels 1.0
|
||||
@ -17,7 +18,12 @@ Rectangle {
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: {
|
||||
if(Window.active){
|
||||
return FluTheme.frameActiveColor
|
||||
}
|
||||
return FluTheme.frameColor
|
||||
}
|
||||
onColumnSourceChanged: {
|
||||
if(columnSource.length!==0){
|
||||
var columns= []
|
||||
@ -772,9 +778,9 @@ Rectangle {
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Connections{
|
||||
target: table_model
|
||||
function onRowCountChanged(){
|
||||
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1}))
|
||||
target: table_view
|
||||
function onRowsChanged(){
|
||||
header_row_model.rows = Array.from({length: table_view.rows}, (_, i) => ({rowIndex:i+1}))
|
||||
}
|
||||
}
|
||||
Timer{
|
||||
|
@ -23,16 +23,27 @@ FluControlBackground{
|
||||
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor }
|
||||
}
|
||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
bottomMargin: 1
|
||||
QtObject{
|
||||
id:d
|
||||
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3
|
||||
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property int offsetSize : 3
|
||||
property color startColor : FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property color endColor: {
|
||||
if(!control.enabled){
|
||||
return d.startColor
|
||||
}
|
||||
return inputItem && inputItem.activeFocus ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
return FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
}
|
||||
}
|
||||
FluClip{
|
||||
anchors.fill: parent
|
||||
radius: [control.radius,control.radius,control.radius,control.radius]
|
||||
visible: inputItem && inputItem.activeFocus
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 2
|
||||
anchors.bottom: parent.bottom
|
||||
color: FluTheme.primaryColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,8 +111,6 @@ FluButton {
|
||||
}
|
||||
Menu{
|
||||
id:popup
|
||||
width: container.width
|
||||
height: container.height
|
||||
modal: true
|
||||
Overlay.modal: Item {}
|
||||
enter: Transition {
|
||||
@ -132,224 +130,219 @@ FluButton {
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
background:Item{
|
||||
background:Rectangle{
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 4
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
contentItem: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
id:container
|
||||
height: 340
|
||||
width: 300
|
||||
radius: 4
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 300
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
id:container
|
||||
implicitHeight: 340
|
||||
implicitWidth: 300
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 280
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
Rectangle{
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_hour.text = model
|
||||
}
|
||||
if(type === 1){
|
||||
text_minute.text = model
|
||||
}
|
||||
if(type === 2){
|
||||
text_ampm.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
}
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_hour.text = model
|
||||
}
|
||||
if(type === 1){
|
||||
text_minute.text = model
|
||||
}
|
||||
if(type === 2){
|
||||
text_ampm.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
width: isH ? 100 : 150
|
||||
height: parent.height
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
model: isH ? generateArray(1,12) : generateArray(0,23)
|
||||
clip: true
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
width: isH ? 100 : 150
|
||||
height: parent.height
|
||||
model: generateArray(0,59)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: isH
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
width: 100
|
||||
height: 76
|
||||
model: [control.amText,control.pmText]
|
||||
clip: true
|
||||
visible: isH
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
Layout.preferredWidth: isH ? 100 : 150
|
||||
Layout.preferredHeight: parent.height-2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
model: isH ? generateArray(1,12) : generateArray(0,23)
|
||||
clip: true
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 1
|
||||
anchors.top: layout_content.bottom
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
Layout.preferredWidth: isH ? 99 : 150
|
||||
Layout.preferredHeight: parent.height-2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
model: generateArray(0,59)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 40
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: isH
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: 76
|
||||
model: [control.amText,control.pmText]
|
||||
clip: true
|
||||
visible: isH
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 60
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
radius: 5
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const hours = text_hour.text
|
||||
const minutes = text_minute.text
|
||||
const period = text_ampm.text
|
||||
const date = new Date()
|
||||
var hours24 = parseInt(hours);
|
||||
if(control.hourFormat === FluTimePickerType.H){
|
||||
if (hours === "12") {
|
||||
hours24 = (period === control.amText) ? 0 : 12;
|
||||
} else {
|
||||
hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const hours = text_hour.text
|
||||
const minutes = text_minute.text
|
||||
const period = text_ampm.text
|
||||
const date = new Date()
|
||||
var hours24 = parseInt(hours);
|
||||
if(control.hourFormat === FluTimePickerType.H){
|
||||
if (hours === "12") {
|
||||
hours24 = (period === control.amText) ? 0 : 12;
|
||||
} else {
|
||||
hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
|
||||
}
|
||||
date.setHours(hours24);
|
||||
date.setMinutes(parseInt(minutes));
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
date.setHours(hours24);
|
||||
date.setMinutes(parseInt(minutes));
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -387,7 +380,7 @@ FluButton {
|
||||
}
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.height){
|
||||
popup.y = control.height
|
||||
popup.y = control.height-1
|
||||
} else if(pos.y>container.height){
|
||||
popup.y = -container.height
|
||||
} else {
|
||||
|
@ -18,21 +18,28 @@ Rectangle {
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
readonly property alias current: d.current
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: {
|
||||
if(Window.active){
|
||||
return FluTheme.frameActiveColor
|
||||
}
|
||||
return FluTheme.frameColor
|
||||
}
|
||||
onDataSourceChanged: {
|
||||
tree_model.setDataSource(dataSource)
|
||||
}
|
||||
onColumnSourceChanged: {
|
||||
var columns= []
|
||||
var headerRow = {}
|
||||
columnSource.forEach(function(item){
|
||||
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
||||
column.display = item.dataIndex
|
||||
columns.push(column)
|
||||
headerRow[item.dataIndex] = item.title
|
||||
})
|
||||
header_column_model.columns = columns
|
||||
header_column_model.rows = [headerRow]
|
||||
if(columnSource.length !== 0){
|
||||
var columns= []
|
||||
var headerRow = {}
|
||||
columnSource.forEach(function(item){
|
||||
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
||||
column.display = item.dataIndex
|
||||
columns.push(column)
|
||||
headerRow[item.dataIndex] = item.title
|
||||
})
|
||||
header_column_model.columns = columns
|
||||
header_column_model.rows = [headerRow]
|
||||
}
|
||||
}
|
||||
FluTreeModel{
|
||||
id:tree_model
|
||||
@ -710,9 +717,6 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
function selectionModel(){
|
||||
return tree_model.selectionModel
|
||||
}
|
||||
function count(){
|
||||
return tree_model.dataSourceSize
|
||||
}
|
||||
@ -741,4 +745,7 @@ Rectangle {
|
||||
d.editPosition = undefined
|
||||
d.editDelegate = undefined
|
||||
}
|
||||
function selectionModel(){
|
||||
return tree_model.selectionModel()
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ Window {
|
||||
id:img_back
|
||||
visible: false
|
||||
cache: false
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
Component.onCompleted: {
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
width = geometry.width
|
||||
@ -328,6 +330,12 @@ Window {
|
||||
function showMaximized(){
|
||||
frameless.showMaximized()
|
||||
}
|
||||
function showMinimized(){
|
||||
frameless.showMinimized()
|
||||
}
|
||||
function showNormal(){
|
||||
frameless.showNormal()
|
||||
}
|
||||
function showLoading(text = "",cancel = true){
|
||||
if(text===""){
|
||||
text = qsTr("Loading...")
|
||||
|
@ -32,9 +32,9 @@ FluWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
function showDialog(){
|
||||
var x = transientParent.x + (transientParent.width - width)/2
|
||||
var y = transientParent.y + (transientParent.height - height)/2
|
||||
function showDialog(offsetX=0,offsetY=0){
|
||||
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
|
||||
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
|
||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||
control.setGeometry(x,y,width,height)
|
||||
control.visibility = Window.Windowed
|
||||
|
@ -38,6 +38,12 @@ Module {
|
||||
name: "init"
|
||||
Parameter { name: "target"; type: "QObject"; isPointer: true }
|
||||
}
|
||||
Method {
|
||||
name: "iconDatas"
|
||||
type: "QJsonArray"
|
||||
Parameter { name: "keyword"; type: "string" }
|
||||
}
|
||||
Method { name: "iconDatas"; type: "QJsonArray" }
|
||||
}
|
||||
Component {
|
||||
name: "FluCalendarViewType"
|
||||
@ -133,10 +139,10 @@ Module {
|
||||
exports: ["FluentUI/FluFrameless 1.0"]
|
||||
exportMetaObjectRevisions: [0]
|
||||
Property { name: "appbar"; type: "QQuickItem"; isPointer: true }
|
||||
Property { name: "topmost"; type: "bool" }
|
||||
Property { name: "maximizeButton"; type: "QQuickItem"; isPointer: true }
|
||||
Property { name: "minimizedButton"; type: "QQuickItem"; isPointer: true }
|
||||
Property { name: "closeButton"; type: "QQuickItem"; isPointer: true }
|
||||
Property { name: "topmost"; type: "bool" }
|
||||
Property { name: "disabled"; type: "bool" }
|
||||
Property { name: "fixSize"; type: "bool" }
|
||||
Method { name: "showFullScreen" }
|
||||
@ -318,18 +324,16 @@ Module {
|
||||
Property { name: "fontSecondaryColor"; type: "QColor" }
|
||||
Property { name: "fontTertiaryColor"; type: "QColor" }
|
||||
Property { name: "itemNormalColor"; type: "QColor" }
|
||||
Property { name: "frameColor"; type: "QColor" }
|
||||
Property { name: "frameActiveColor"; type: "QColor" }
|
||||
Property { name: "itemHoverColor"; type: "QColor" }
|
||||
Property { name: "itemPressColor"; type: "QColor" }
|
||||
Property { name: "itemCheckColor"; type: "QColor" }
|
||||
Property { name: "desktopImagePath"; type: "string" }
|
||||
Property { name: "darkMode"; type: "int" }
|
||||
Property { name: "nativeText"; type: "bool" }
|
||||
Property { name: "animationEnabled"; type: "bool" }
|
||||
Method {
|
||||
name: "awesomeList"
|
||||
type: "QJsonArray"
|
||||
Parameter { name: "keyword"; type: "string" }
|
||||
}
|
||||
Method { name: "awesomeList"; type: "QJsonArray" }
|
||||
Property { name: "blurBehindWindowEnabled"; type: "bool" }
|
||||
}
|
||||
Component {
|
||||
name: "FluThemeType"
|
||||
@ -480,6 +484,18 @@ Module {
|
||||
type: "QRect"
|
||||
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
|
||||
}
|
||||
Method { name: "getWallpaperFilePath"; type: "string" }
|
||||
Method {
|
||||
name: "imageMainColor"
|
||||
type: "QColor"
|
||||
Parameter { name: "image"; type: "QImage" }
|
||||
Parameter { name: "bright"; type: "double" }
|
||||
}
|
||||
Method {
|
||||
name: "imageMainColor"
|
||||
type: "QColor"
|
||||
Parameter { name: "image"; type: "QImage" }
|
||||
}
|
||||
}
|
||||
Component {
|
||||
name: "FluTreeModel"
|
||||
@ -487,7 +503,6 @@ Module {
|
||||
exports: ["FluentUI/FluTreeModel 1.0"]
|
||||
exportMetaObjectRevisions: [0]
|
||||
Property { name: "dataSourceSize"; type: "int" }
|
||||
Property { name: "selectionModel"; type: "QList<FluTreeNode*>" }
|
||||
Property { name: "columnSource"; type: "QList<QVariantMap>" }
|
||||
Method {
|
||||
name: "removeRows"
|
||||
@ -504,6 +519,11 @@ Module {
|
||||
type: "QObject*"
|
||||
Parameter { name: "row"; type: "int" }
|
||||
}
|
||||
Method {
|
||||
name: "setRow"
|
||||
Parameter { name: "row"; type: "int" }
|
||||
Parameter { name: "data"; type: "QVariantMap" }
|
||||
}
|
||||
Method {
|
||||
name: "setData"
|
||||
Parameter { name: "data"; type: "QList<FluTreeNode*>" }
|
||||
@ -541,6 +561,7 @@ Module {
|
||||
}
|
||||
Method { name: "allExpand" }
|
||||
Method { name: "allCollapse" }
|
||||
Method { name: "selectionModel"; type: "QVariant" }
|
||||
}
|
||||
Component {
|
||||
name: "FluTreeViewType"
|
||||
@ -584,12 +605,12 @@ Module {
|
||||
}
|
||||
}
|
||||
Component {
|
||||
name: "Fluent_Awesome"
|
||||
name: "Fluent_Icons"
|
||||
exports: ["FluentUI/FluentIcons 1.0"]
|
||||
isCreatable: false
|
||||
exportMetaObjectRevisions: [0]
|
||||
Enum {
|
||||
name: "Fluent_AwesomeType"
|
||||
name: "Fluent_IconType"
|
||||
values: {
|
||||
"GlobalNavButton": 59136,
|
||||
"Wifi": 59137,
|
||||
@ -2421,37 +2442,37 @@ Module {
|
||||
Property { name: "darkClickListener"; type: "QVariant" }
|
||||
Property {
|
||||
name: "buttonStayTop"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonMinimize"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonMaximize"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonClose"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonDark"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "layoutMacosButtons"
|
||||
type: "FluLoader_QMLTYPE_12"
|
||||
type: "FluLoader_QMLTYPE_14"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
@ -3148,8 +3169,8 @@ Module {
|
||||
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
|
||||
Property { name: "topPadding"; type: "int" }
|
||||
Property { name: "pageMode"; type: "int" }
|
||||
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true }
|
||||
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true }
|
||||
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true }
|
||||
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true }
|
||||
Property { name: "navCompactWidth"; type: "int" }
|
||||
Property { name: "navTopMargin"; type: "int" }
|
||||
Property { name: "cellHeight"; type: "int" }
|
||||
@ -3157,13 +3178,13 @@ Module {
|
||||
Property { name: "hideNavAppBar"; type: "bool" }
|
||||
Property {
|
||||
name: "buttonMenu"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
Property {
|
||||
name: "buttonBack"
|
||||
type: "FluIconButton_QMLTYPE_19"
|
||||
type: "FluIconButton_QMLTYPE_20"
|
||||
isReadonly: true
|
||||
isPointer: true
|
||||
}
|
||||
@ -3975,21 +3996,23 @@ Module {
|
||||
Property { name: "previousText"; type: "string" }
|
||||
}
|
||||
Component {
|
||||
prototype: "QQuickItem"
|
||||
prototype: "QQuickRectangle"
|
||||
name: "FluentUI/FluTreeView 1.0"
|
||||
exports: ["FluentUI/FluTreeView 1.0"]
|
||||
exportMetaObjectRevisions: [0]
|
||||
isComposite: true
|
||||
defaultProperty: "data"
|
||||
Property { name: "currentIndex"; type: "int" }
|
||||
Property { name: "dataSource"; type: "QVariant" }
|
||||
Property { name: "columnSource"; type: "QVariant" }
|
||||
Property { name: "showLine"; type: "bool" }
|
||||
Property { name: "draggable"; type: "bool" }
|
||||
Property { name: "cellHeight"; type: "int" }
|
||||
Property { name: "depthPadding"; type: "int" }
|
||||
Property { name: "checkable"; type: "bool" }
|
||||
Property { name: "lineColor"; type: "QColor" }
|
||||
Method { name: "selectionModel"; type: "QVariant" }
|
||||
Property { name: "borderColor"; type: "QColor" }
|
||||
Property { name: "selectedBorderColor"; type: "QColor" }
|
||||
Property { name: "selectedColor"; type: "QColor" }
|
||||
Property { name: "current"; type: "QVariant"; isReadonly: true }
|
||||
Method { name: "count"; type: "QVariant" }
|
||||
Method { name: "visibleCount"; type: "QVariant" }
|
||||
Method {
|
||||
@ -4004,6 +4027,14 @@ Module {
|
||||
}
|
||||
Method { name: "allExpand"; type: "QVariant" }
|
||||
Method { name: "allCollapse"; type: "QVariant" }
|
||||
Method {
|
||||
name: "customItem"
|
||||
type: "QVariant"
|
||||
Parameter { name: "comId"; type: "QVariant" }
|
||||
Parameter { name: "options"; type: "QVariant" }
|
||||
}
|
||||
Method { name: "closeEditor"; type: "QVariant" }
|
||||
Method { name: "selectionModel"; type: "QVariant" }
|
||||
}
|
||||
Component {
|
||||
prototype: "QQuickWindowQmlImpl"
|
||||
|
@ -14,7 +14,7 @@ Rectangle{
|
||||
property string closeText : qsTr("Close")
|
||||
property string stayTopText : qsTr("Sticky on Top")
|
||||
property string stayTopCancelText : qsTr("Sticky on Top cancelled")
|
||||
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||
property color textColor: FluTheme.fontPrimaryColor
|
||||
property color minimizeNormalColor: FluTheme.itemNormalColor
|
||||
property color minimizeHoverColor: FluTheme.itemHoverColor
|
||||
property color minimizePressColor: FluTheme.itemPressColor
|
||||
@ -22,7 +22,7 @@ Rectangle{
|
||||
property color maximizeHoverColor: FluTheme.itemHoverColor
|
||||
property color maximizePressColor: FluTheme.itemPressColor
|
||||
property color closeNormalColor: Qt.rgba(0,0,0,0)
|
||||
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
|
||||
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
|
||||
property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
|
||||
property bool showDark: false
|
||||
property bool showClose: true
|
||||
|
@ -58,12 +58,8 @@ FluTextBox{
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
contentItem: FluRectangle{
|
||||
radius: [4,4,4,4]
|
||||
FluShadow{
|
||||
radius: 4
|
||||
}
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
contentItem: FluClip{
|
||||
radius: [5,5,5,5]
|
||||
ListView{
|
||||
id:list_view
|
||||
anchors.fill: parent
|
||||
@ -96,10 +92,13 @@ FluTextBox{
|
||||
radius:4
|
||||
}
|
||||
color: {
|
||||
if(hovered){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
if(pressed){
|
||||
return FluTheme.itemPressColor
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
if(hovered){
|
||||
return FluTheme.itemHoverColor
|
||||
}
|
||||
return FluTheme.itemNormalColor
|
||||
}
|
||||
}
|
||||
contentItem: FluText{
|
||||
@ -111,22 +110,28 @@ FluTextBox{
|
||||
}
|
||||
}
|
||||
}
|
||||
background: Item{
|
||||
id:container
|
||||
background:Rectangle{
|
||||
id: rect_background
|
||||
implicitWidth: control.width
|
||||
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8)
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
onTextChanged: {
|
||||
d.loadData()
|
||||
if(d.flagVisible){
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.implicitHeight){
|
||||
if(d.window.height>pos.y+control.height+rect_background.implicitHeight){
|
||||
control_popup.y = control.height
|
||||
} else if(pos.y>container.implicitHeight){
|
||||
control_popup.y = -container.implicitHeight
|
||||
} else if(pos.y>rect_background.implicitHeight){
|
||||
control_popup.y = -rect_background.implicitHeight
|
||||
} else {
|
||||
control_popup.y = d.window.height-(pos.y+container.implicitHeight)
|
||||
control_popup.y = d.window.height-(pos.y+rect_background.implicitHeight) - 1
|
||||
}
|
||||
control_popup.visible = true
|
||||
}
|
||||
|
@ -57,12 +57,12 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: {
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/255,1) : Qt.rgba(92/255,92/255,92/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
||||
}
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,16 +13,15 @@ Button{
|
||||
property color current : Qt.rgba(1,1,1,1)
|
||||
signal accepted()
|
||||
property int colorHandleRadius: 8
|
||||
property string cancelText: "取消"
|
||||
property string okText: "确定"
|
||||
property string titleText: "颜色选择器"
|
||||
property string editText: "编辑颜色"
|
||||
property string redText: "红色"
|
||||
property string greenText: "绿色"
|
||||
property string blueText: "蓝色"
|
||||
property string opacityText: "透明度"
|
||||
background:
|
||||
Rectangle{
|
||||
property string cancelText: qsTr("Cancel")
|
||||
property string okText: qsTr("OK")
|
||||
property string titleText: qsTr("Color Picker")
|
||||
property string editText: qsTr("Edit Color")
|
||||
property string redText: qsTr("Red")
|
||||
property string greenText: qsTr("Green")
|
||||
property string blueText: qsTr("Blue")
|
||||
property string opacityText: qsTr("Opacity")
|
||||
background: Rectangle{
|
||||
id:layout_color
|
||||
radius: 5
|
||||
color:"#00000000"
|
||||
|
@ -134,10 +134,9 @@ T.ComboBox {
|
||||
}
|
||||
}
|
||||
background:Rectangle{
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(249/255,249/255,249/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
border.width: 1
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 5
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ FluButton {
|
||||
id:divider_1
|
||||
width: 1
|
||||
x: parent.width/3
|
||||
height: parent.height-1
|
||||
height: parent.height - 1
|
||||
color: control.dividerColor
|
||||
visible: showYear
|
||||
}
|
||||
@ -49,7 +49,7 @@ FluButton {
|
||||
id:divider_2
|
||||
width: 1
|
||||
x: showYear ? parent.width*2/3 : parent.width/2
|
||||
height: parent.height-1
|
||||
height: parent.height - 1
|
||||
color: control.dividerColor
|
||||
}
|
||||
FluText{
|
||||
@ -95,8 +95,6 @@ FluButton {
|
||||
Menu{
|
||||
id:popup
|
||||
modal: true
|
||||
width: container.width
|
||||
height: container.height
|
||||
Overlay.modal: Item {}
|
||||
enter: Transition {
|
||||
reversible: true
|
||||
@ -115,227 +113,220 @@ FluButton {
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
background:Item{
|
||||
background:Rectangle{
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 4
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
contentItem: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
id:container
|
||||
radius: 4
|
||||
width: 300
|
||||
height: 340
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
FluShadow{
|
||||
radius: 4
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 300
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
id:container
|
||||
implicitHeight: 340
|
||||
implicitWidth: 300
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 280
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height: 38
|
||||
width: getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
Rectangle{
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_year.text = model
|
||||
list_view_2.model = generateMonthArray(1,12)
|
||||
text_month.text = list_view_2.model[list_view_2.currentIndex]
|
||||
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
}
|
||||
if(type === 1){
|
||||
text_month.text = model
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
|
||||
}
|
||||
if(type === 2){
|
||||
text_day.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
}
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_year.text = model
|
||||
list_view_2.model = generateMonthArray(1,12)
|
||||
text_month.text = list_view_2.model[list_view_2.currentIndex]
|
||||
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
}
|
||||
if(type === 1){
|
||||
text_month.text = model
|
||||
list_view_3.model = generateMonthDaysArray(list_view_1.model[list_view_1.currentIndex],list_view_2.model[list_view_2.currentIndex])
|
||||
text_day.text = list_view_3.model[list_view_3.currentIndex]
|
||||
|
||||
}
|
||||
if(type === 2){
|
||||
text_day.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
width: 100
|
||||
height: parent.height
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
model: generateYearArray(1924,2048)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
visible: showYear
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
width: showYear ? 100 : 150
|
||||
height: parent.height
|
||||
clip: true
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
width: showYear ? 100 : 150
|
||||
height: parent.height
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
model: generateYearArray(1924,2048)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
visible: showYear
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 1
|
||||
anchors.top: layout_content.bottom
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
visible: showYear
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
Layout.preferredWidth: showYear ? 99 : 150
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
clip: true
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 40
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
ListView{
|
||||
id:list_view_3
|
||||
Layout.preferredWidth: showYear ? 99 : 150
|
||||
Layout.preferredHeight: parent.height - 2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 60
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
radius: 5
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const year = text_year.text
|
||||
const month = text_month.text
|
||||
const day = text_day.text
|
||||
const date = new Date()
|
||||
date.setFullYear(parseInt(year));
|
||||
date.setMonth(parseInt(month) - 1);
|
||||
date.setDate(parseInt(day));
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const year = text_year.text
|
||||
const month = text_month.text
|
||||
const day = text_day.text
|
||||
const date = new Date()
|
||||
date.setFullYear(parseInt(year));
|
||||
date.setMonth(parseInt(month) - 1);
|
||||
date.setDate(parseInt(day));
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -360,7 +351,7 @@ FluButton {
|
||||
text_day.text = day
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.height){
|
||||
popup.y = control.height
|
||||
popup.y = control.height-1
|
||||
} else if(pos.y>container.height){
|
||||
popup.y = -container.height
|
||||
} else {
|
||||
|
@ -20,16 +20,20 @@ FluButton {
|
||||
}
|
||||
iconColor:control.textColor
|
||||
}
|
||||
Item{
|
||||
id: d
|
||||
property var window: Window.window
|
||||
}
|
||||
onClicked: {
|
||||
if(menu.count !==0){
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
var containerHeight = menu.count*36
|
||||
if(window.height>pos.y+control.height+containerHeight){
|
||||
if(d.window.height>pos.y+control.height+containerHeight){
|
||||
menu.y = control.height
|
||||
}else if(pos.y>containerHeight){
|
||||
menu.y = -containerHeight
|
||||
}else{
|
||||
menu.y = window.height-(pos.y+containerHeight)
|
||||
menu.y = d.window.height-(pos.y+containerHeight)
|
||||
}
|
||||
menu.open()
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ T.Menu {
|
||||
background: Rectangle {
|
||||
implicitWidth: 150
|
||||
implicitHeight: 36
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(252/255,252/255,252/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
border.width: 1
|
||||
radius: 5
|
||||
FluShadow{}
|
||||
|
@ -7,11 +7,11 @@ Item{
|
||||
id:control
|
||||
default property alias content: container.data
|
||||
property int statusMode: FluStatusLayoutType.Loading
|
||||
property string loadingText:"正在加载..."
|
||||
property string emptyText: "空空如也"
|
||||
property string errorText: "页面出错了.."
|
||||
property string errorButtonText: "重新加载"
|
||||
property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
property string loadingText: qsTr("Loading...")
|
||||
property string emptyText: qsTr("Empty")
|
||||
property string errorText: qsTr("Error")
|
||||
property string errorButtonText: qsTr("Reload")
|
||||
property color color: Qt.rgba(0,0,0,0)
|
||||
signal errorClicked
|
||||
property Component loadingItem : com_loading
|
||||
property Component emptyItem : com_empty
|
||||
|
@ -18,7 +18,12 @@ Rectangle {
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: {
|
||||
if(Window.active){
|
||||
return FluTheme.frameActiveColor
|
||||
}
|
||||
return FluTheme.frameColor
|
||||
}
|
||||
onColumnSourceChanged: {
|
||||
if(columnSource.length!==0){
|
||||
var columns= []
|
||||
@ -773,9 +778,9 @@ Rectangle {
|
||||
timer_vertical_force_layout.restart()
|
||||
}
|
||||
Connections{
|
||||
target: table_model
|
||||
function onRowCountChanged(){
|
||||
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1}))
|
||||
target: table_view
|
||||
function onRowsChanged(){
|
||||
header_row_model.rows = Array.from({length: table_view.rows}, (_, i) => ({rowIndex:i+1}))
|
||||
}
|
||||
}
|
||||
Timer{
|
||||
|
@ -23,16 +23,27 @@ FluControlBackground{
|
||||
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor }
|
||||
}
|
||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
bottomMargin: 1
|
||||
QtObject{
|
||||
id:d
|
||||
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3
|
||||
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property int offsetSize : 3
|
||||
property color startColor : FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property color endColor: {
|
||||
if(!control.enabled){
|
||||
return d.startColor
|
||||
}
|
||||
return inputItem && inputItem.activeFocus ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
return FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
}
|
||||
}
|
||||
FluClip{
|
||||
anchors.fill: parent
|
||||
radius: [control.radius,control.radius,control.radius,control.radius]
|
||||
visible: inputItem && inputItem.activeFocus
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 2
|
||||
anchors.bottom: parent.bottom
|
||||
color: FluTheme.primaryColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,14 +58,14 @@ FluButton {
|
||||
id: divider_1
|
||||
width: 1
|
||||
x: isH ? parent.width/3 : parent.width/2
|
||||
height: parent.height-1
|
||||
height: parent.height - 1
|
||||
color: dividerColor
|
||||
}
|
||||
Rectangle{
|
||||
id: divider_2
|
||||
width: 1
|
||||
x: parent.width*2/3
|
||||
height: parent.height-1
|
||||
height: parent.height - 1
|
||||
color: dividerColor
|
||||
visible: isH
|
||||
}
|
||||
@ -111,8 +111,6 @@ FluButton {
|
||||
}
|
||||
Menu{
|
||||
id:popup
|
||||
width: container.width
|
||||
height: container.height
|
||||
modal: true
|
||||
Overlay.modal: Item {}
|
||||
enter: Transition {
|
||||
@ -132,224 +130,219 @@ FluButton {
|
||||
duration: FluTheme.animationEnabled ? 83 : 0
|
||||
}
|
||||
}
|
||||
background:Item{
|
||||
background:Rectangle{
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
FluShadow{
|
||||
radius: 4
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
contentItem: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
id:container
|
||||
height: 340
|
||||
width: 300
|
||||
radius: 4
|
||||
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 300
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
id:container
|
||||
implicitHeight: 340
|
||||
implicitWidth: 300
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
RowLayout{
|
||||
id:layout_content
|
||||
spacing: 0
|
||||
width: parent.width
|
||||
height: 280
|
||||
Component{
|
||||
id:list_delegate
|
||||
Item{
|
||||
height:38
|
||||
width:getListView().width
|
||||
function getListView(){
|
||||
if(type === 0)
|
||||
return list_view_1
|
||||
if(type === 1)
|
||||
return list_view_2
|
||||
if(type === 2)
|
||||
return list_view_3
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
Rectangle{
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 2
|
||||
anchors.bottomMargin: 2
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 5
|
||||
color: {
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_hour.text = model
|
||||
}
|
||||
if(type === 1){
|
||||
text_minute.text = model
|
||||
}
|
||||
if(type === 2){
|
||||
text_ampm.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(0,0,0,0)
|
||||
}
|
||||
radius: 3
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
getListView().currentIndex = position
|
||||
if(type === 0){
|
||||
text_hour.text = model
|
||||
}
|
||||
if(type === 1){
|
||||
text_minute.text = model
|
||||
}
|
||||
if(type === 2){
|
||||
text_ampm.text = model
|
||||
}
|
||||
}
|
||||
}
|
||||
FluText{
|
||||
text:model
|
||||
color: {
|
||||
if(getListView().currentIndex === position){
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}
|
||||
}else{
|
||||
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
width: isH ? 100 : 150
|
||||
height: parent.height
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
model: isH ? generateArray(1,12) : generateArray(0,23)
|
||||
clip: true
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
width: isH ? 100 : 150
|
||||
height: parent.height
|
||||
model: generateArray(0,59)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: isH
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
width: 100
|
||||
height: 76
|
||||
model: [control.amText,control.pmText]
|
||||
clip: true
|
||||
visible: isH
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
ListView{
|
||||
id:list_view_1
|
||||
Layout.preferredWidth: isH ? 100 : 150
|
||||
Layout.preferredHeight: parent.height-2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
model: isH ? generateArray(1,12) : generateArray(0,23)
|
||||
clip: true
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:0
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: 1
|
||||
anchors.top: layout_content.bottom
|
||||
Layout.preferredWidth: 1
|
||||
Layout.preferredHeight: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
ListView{
|
||||
id:list_view_2
|
||||
Layout.preferredWidth: isH ? 99 : 150
|
||||
Layout.preferredHeight: parent.height-2
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
model: generateArray(0,59)
|
||||
clip: true
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:1
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 40
|
||||
radius: 5
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
width: 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: isH
|
||||
}
|
||||
ListView{
|
||||
id:list_view_3
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: 76
|
||||
model: [control.amText,control.pmText]
|
||||
clip: true
|
||||
visible: isH
|
||||
preferredHighlightBegin: 0
|
||||
preferredHighlightEnd: 0
|
||||
highlightMoveDuration: 0
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
boundsBehavior:Flickable.StopAtBounds
|
||||
delegate: FluLoader{
|
||||
property var model: modelData
|
||||
property int type:2
|
||||
property int position:index
|
||||
sourceComponent: list_delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:layout_actions
|
||||
height: 60
|
||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||
border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
radius: 5
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
bottom:parent.bottom
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Item {
|
||||
id:divider
|
||||
width: 1
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
FluButton{
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
rightMargin: 10
|
||||
right: divider.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.cancelText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
anchors{
|
||||
right: parent.right
|
||||
left: divider.right
|
||||
rightMargin: 20
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const hours = text_hour.text
|
||||
const minutes = text_minute.text
|
||||
const period = text_ampm.text
|
||||
const date = new Date()
|
||||
var hours24 = parseInt(hours);
|
||||
if(control.hourFormat === FluTimePickerType.H){
|
||||
if (hours === "12") {
|
||||
hours24 = (period === control.amText) ? 0 : 12;
|
||||
} else {
|
||||
hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
|
||||
}
|
||||
text: control.okText
|
||||
onClicked: {
|
||||
d.changeFlag = false
|
||||
popup.close()
|
||||
const hours = text_hour.text
|
||||
const minutes = text_minute.text
|
||||
const period = text_ampm.text
|
||||
const date = new Date()
|
||||
var hours24 = parseInt(hours);
|
||||
if(control.hourFormat === FluTimePickerType.H){
|
||||
if (hours === "12") {
|
||||
hours24 = (period === control.amText) ? 0 : 12;
|
||||
} else {
|
||||
hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
|
||||
}
|
||||
date.setHours(hours24);
|
||||
date.setMinutes(parseInt(minutes));
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
date.setHours(hours24);
|
||||
date.setMinutes(parseInt(minutes));
|
||||
date.setSeconds(0);
|
||||
current = date
|
||||
control.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -387,7 +380,7 @@ FluButton {
|
||||
}
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
if(d.window.height>pos.y+control.height+container.height){
|
||||
popup.y = control.height
|
||||
popup.y = control.height-1
|
||||
} else if(pos.y>container.height){
|
||||
popup.y = -container.height
|
||||
} else {
|
||||
|
@ -18,7 +18,12 @@ Rectangle {
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
readonly property alias current: d.current
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: {
|
||||
if(Window.active){
|
||||
return FluTheme.frameActiveColor
|
||||
}
|
||||
return FluTheme.frameColor
|
||||
}
|
||||
onDataSourceChanged: {
|
||||
tree_model.setDataSource(dataSource)
|
||||
}
|
||||
@ -710,9 +715,6 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
function selectionModel(){
|
||||
return tree_model.selectionModel
|
||||
}
|
||||
function count(){
|
||||
return tree_model.dataSourceSize
|
||||
}
|
||||
@ -741,4 +743,7 @@ Rectangle {
|
||||
d.editPosition = undefined
|
||||
d.editDelegate = undefined
|
||||
}
|
||||
function selectionModel(){
|
||||
return tree_model.selectionModel()
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,8 @@ Window {
|
||||
id:img_back
|
||||
visible: false
|
||||
cache: false
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
Component.onCompleted: {
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
width = geometry.width
|
||||
@ -327,6 +329,12 @@ Window {
|
||||
function showMaximized(){
|
||||
frameless.showMaximized()
|
||||
}
|
||||
function showMinimized(){
|
||||
frameless.showMinimized()
|
||||
}
|
||||
function showNormal(){
|
||||
frameless.showNormal()
|
||||
}
|
||||
function showLoading(text = "",cancel = true){
|
||||
if(text===""){
|
||||
text = qsTr("Loading...")
|
||||
|
@ -32,9 +32,9 @@ FluWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
function showDialog(){
|
||||
var x = transientParent.x + (transientParent.width - width)/2
|
||||
var y = transientParent.y + (transientParent.height - height)/2
|
||||
function showDialog(offsetX=0,offsetY=0){
|
||||
var x = transientParent.x + (transientParent.width - width)/2 + offsetX
|
||||
var y = transientParent.y + (transientParent.height - height)/2 + offsetY
|
||||
control.stayTop = Qt.binding(function(){return transientParent.stayTop})
|
||||
control.setGeometry(x,y,width,height)
|
||||
control.visibility = Window.Windowed
|
||||
|
@ -70,6 +70,57 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluColorPicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="16"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="17"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="17"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="18"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="18"/>
|
||||
<source>Color Picker</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="19"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="19"/>
|
||||
<source>Edit Color</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="20"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="20"/>
|
||||
<source>Red</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="21"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="21"/>
|
||||
<source>Green</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="22"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="22"/>
|
||||
<source>Blue</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="23"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="23"/>
|
||||
<source>Opacity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluContentDialog</name>
|
||||
<message>
|
||||
@ -94,31 +145,31 @@
|
||||
<context>
|
||||
<name>FluDatePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
|
||||
<source>Year</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<source>Month</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<source>Day</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -181,6 +232,33 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluStatusLayout</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="10"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluTextBoxMenu</name>
|
||||
<message>
|
||||
@ -212,31 +290,37 @@
|
||||
<name>FluTimePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<source>AM</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<source>PM</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<source>Hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<source>Minute</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -265,8 +349,8 @@
|
||||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="335"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="334"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -70,6 +70,57 @@
|
||||
<translation type="unfinished">选择日期</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluColorPicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="16"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="17"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="17"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="18"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="18"/>
|
||||
<source>Color Picker</source>
|
||||
<translation type="unfinished">颜色选择器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="19"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="19"/>
|
||||
<source>Edit Color</source>
|
||||
<translation type="unfinished">编辑颜色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="20"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="20"/>
|
||||
<source>Red</source>
|
||||
<translation type="unfinished">红色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="21"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="21"/>
|
||||
<source>Green</source>
|
||||
<translation type="unfinished">绿色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="22"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="22"/>
|
||||
<source>Blue</source>
|
||||
<translation type="unfinished">蓝色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluColorPicker.qml" line="23"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluColorPicker.qml" line="23"/>
|
||||
<source>Opacity</source>
|
||||
<translation type="unfinished">透明度</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluContentDialog</name>
|
||||
<message>
|
||||
@ -94,31 +145,31 @@
|
||||
<context>
|
||||
<name>FluDatePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
|
||||
<source>Year</source>
|
||||
<translation type="unfinished">年</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
|
||||
<source>Month</source>
|
||||
<translation type="unfinished">月</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
|
||||
<source>Day</source>
|
||||
<translation type="unfinished">日</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
@ -181,6 +232,33 @@
|
||||
<translation type="unfinished">重置</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluStatusLayout</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="10"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">加载中...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished">空空如也</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished">似乎出了点问题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished">重新加载</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluTextBoxMenu</name>
|
||||
<message>
|
||||
@ -212,31 +290,37 @@
|
||||
<name>FluTimePicker</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
|
||||
<source>AM</source>
|
||||
<translation type="unfinished">上午</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
|
||||
<source>PM</source>
|
||||
<translation type="unfinished">下午</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
|
||||
<source>Hour</source>
|
||||
<translation type="unfinished">时</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
|
||||
<source>Minute</source>
|
||||
<translation type="unfinished">分</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
</message>
|
||||
@ -265,8 +349,8 @@
|
||||
<context>
|
||||
<name>FluWindow</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="335"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="334"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">加载中...</translation>
|
||||
</message>
|
||||
|
Reference in New Issue
Block a user