Compare commits

..

23 Commits

Author SHA1 Message Date
5fd7c7d10e update 2024-04-24 10:37:15 +08:00
83507a6ed5 update 2024-04-24 09:57:28 +08:00
789d9164a1 Merge branch '1.7.5-dev' 2024-04-24 09:53:59 +08:00
cb44759978 update 2024-04-23 22:38:39 +08:00
04c52b1b25 fix bug 2024-04-23 21:19:32 +08:00
b8ef9169b9 update 2024-04-23 19:33:05 +08:00
c7de653ba2 update 2024-04-23 13:41:26 +08:00
2ddb7e3290 update 2024-04-23 00:32:15 +08:00
e8d79e3c7b update 2024-04-23 00:31:20 +08:00
bc4510077f update 2024-04-19 01:04:13 +08:00
179bc8b21f update 2024-04-19 00:42:35 +08:00
8fe4e3b047 update 2024-04-17 22:05:49 +08:00
a443f3a9ba update 2024-04-17 21:39:55 +08:00
1a0f2afee0 update 2024-04-17 15:11:14 +08:00
c9c737f2fc update 2024-04-16 12:36:41 +08:00
f0f00b9eba Merge pull request #483 from mariuszmaximus/main
fix for msys2
2024-04-15 12:39:47 +08:00
956f2e0ad0 fix for msys2 2024-04-14 19:38:52 +02:00
ecd13a9cca update 2024-04-15 00:11:41 +08:00
17bfff2346 update 2024-04-14 23:58:15 +08:00
295dcf02c4 update 2024-04-14 23:09:41 +08:00
f701f97756 update 2024-04-14 11:43:32 +08:00
2c4cf82f63 update 2024-04-13 22:00:15 +08:00
e8c47e0fd8 update 2024-04-13 21:30:23 +08:00
71 changed files with 2430 additions and 2407 deletions

View File

@ -91,14 +91,14 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/inno-setup-action@v1.0.1 uses: zhuzichu520/inno-setup-action@v1.0.1
with: with:
filepath: ./action-cli/InstallerScript.iss filepath: ./package/InstallerScript.iss
- name: uploadRelease - name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} 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 asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View File

@ -78,14 +78,14 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/inno-setup-action@v1.0.1 uses: zhuzichu520/inno-setup-action@v1.0.1
with: with:
filepath: ./action-cli/InstallerScript.iss filepath: ./package/InstallerScript.iss
- name: uploadRelease - name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} 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 asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View File

@ -85,14 +85,14 @@ jobs:
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/inno-setup-action@v1.0.1 uses: zhuzichu520/inno-setup-action@v1.0.1
with: with:
filepath: ./action-cli/InstallerScript.iss filepath: ./package/InstallerScript.iss
- name: uploadRelease - name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} 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 asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

4
.gitignore vendored
View File

@ -36,10 +36,8 @@ bin
build build
cmake-build-* cmake-build-*
.idea .idea
package
example/Version.h example/Version.h
action-cli
dist dist
*.qm *.qm

View File

@ -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_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network)
#添加国际化脚本 #添加国际化脚本
find_program(QT_LUPDATE NAMES lupdate) find_program(QT_LUPDATE NAMES lupdate lupdate-qt6)
find_program(QT_LRELEASE NAMES lrelease) find_program(QT_LRELEASE NAMES lrelease lrelease-qt6)
file(GLOB TS_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.ts) file(GLOB TS_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.ts)
add_custom_target(Script-UpdateTranslations add_custom_target(Script-UpdateTranslations
COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} 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( configure_file(
${CMAKE_SOURCE_DIR}/.cmake/InstallerScript.iss.in ${CMAKE_SOURCE_DIR}/.cmake/InstallerScript.iss.in
${CMAKE_SOURCE_DIR}/action-cli/InstallerScript.iss ${CMAKE_SOURCE_DIR}/package/InstallerScript.iss
) )
endif () endif ()

View File

@ -180,7 +180,6 @@
<file>qml/window/PageWindow.qml</file> <file>qml/window/PageWindow.qml</file>
<file>qml/page/T_StaggeredLayout.qml</file> <file>qml/page/T_StaggeredLayout.qml</file>
<file>qml/page/T_Clip.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_Network.qml</file>
<file>qml/page/T_ShortcutPicker.qml</file> <file>qml/page/T_ShortcutPicker.qml</file>
<file>qml/chart/T_BarChart.qml</file> <file>qml/chart/T_BarChart.qml</file>

View File

@ -515,11 +515,6 @@
</message> </message>
<message> <message>
<location filename="qml/global/ItemsOriginal.qml" line="487"/> <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> <source>Test Crash</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -551,104 +546,104 @@
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="83"/> <location filename="qml/window/MainWindow.qml" line="87"/>
<location filename="qml/window/MainWindow.qml" line="91"/> <location filename="qml/window/MainWindow.qml" line="95"/>
<source>Quit</source> <source>Quit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Are you sure you want to exit the program?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="85"/> <location filename="qml/window/MainWindow.qml" line="89"/>
<source>Minimize</source> <source>Minimize</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="88"/> <location filename="qml/window/MainWindow.qml" line="92"/>
<source>Friendly Reminder</source> <source>Friendly Reminder</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="92"/> <location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="336"/> <location filename="qml/window/MainWindow.qml" line="340"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="103"/> <location filename="qml/window/MainWindow.qml" line="107"/>
<source>Open in Separate Window</source> <source>Open in Separate Window</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="200"/> <location filename="qml/window/MainWindow.qml" line="204"/>
<source>Click Time</source> <source>Click Time</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="210"/> <location filename="qml/window/MainWindow.qml" line="214"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="301"/> <location filename="qml/window/MainWindow.qml" line="305"/>
<source>Finish</source> <source>Finish</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="302"/> <location filename="qml/window/MainWindow.qml" line="306"/>
<source>Next</source> <source>Next</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="303"/> <location filename="qml/window/MainWindow.qml" line="307"/>
<source>Previous</source> <source>Previous</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="307"/> <location filename="qml/window/MainWindow.qml" line="311"/>
<source>Dark Mode</source> <source>Dark Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="309"/> <location filename="qml/window/MainWindow.qml" line="313"/>
<source>Hide Easter eggs</source> <source>Hide Easter eggs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Try a few more clicks!!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="333"/> <location filename="qml/window/MainWindow.qml" line="337"/>
<source>Upgrade Tips</source> <source>Upgrade Tips</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>FluentUI is currently up to date </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="334"/> <location filename="qml/window/MainWindow.qml" line="338"/>
<source> -- The current app version</source> <source> -- The current app version</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="334"/> <location filename="qml/window/MainWindow.qml" line="338"/>
<source> <source>
Now go and download the new version Now go and download the new version
@ -657,17 +652,17 @@ Updated content:
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="337"/> <location filename="qml/window/MainWindow.qml" line="341"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>The current version is already the latest</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="371"/> <location filename="qml/window/MainWindow.qml" line="375"/>
<source>The network is abnormal</source> <source>The network is abnormal</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1089,46 +1084,6 @@ Updated content:
<source>Click to Select a Color - &gt;</source> <source>Click to Select a Color - &gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </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>
<context> <context>
<name>T_ComboBox</name> <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> <context>
<name>T_Home</name> <name>T_Home</name>
<message> <message>
<location filename="qml/page/T_Home.qml" line="23"/> <location filename="qml/page/T_Home.qml" line="19"/>
<source>FluentUI GitHub</source> <source>FluentUI GitHub</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_Home.qml" line="32"/> <location filename="qml/page/T_Home.qml" line="28"/>
<source>FluentUI Initializr</source> <source>FluentUI Initializr</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1970,26 +1925,6 @@ Some contents...</source>
<source>StatusLayout</source> <source>StatusLayout</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </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>
<context> <context>
<name>T_TabView</name> <name>T_TabView</name>
@ -2394,25 +2329,25 @@ Some contents...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="230"/> <location filename="qml/page/T_TreeView.qml" line="183"/>
<source>Title</source> <source>Title</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Avatar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="242"/> <location filename="qml/page/T_TreeView.qml" line="195"/>
<source>Address</source> <source>Address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="qml/page/T_TreeView.qml" line="234"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>T_Typography</name> <name>T_Typography</name>

View File

@ -514,12 +514,11 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/global/ItemsOriginal.qml" line="487"/>
<source>3D</source> <source>3D</source>
<translation type="unfinished">3D</translation> <translation type="obsolete">3D</translation>
</message> </message>
<message> <message>
<location filename="qml/global/ItemsOriginal.qml" line="493"/> <location filename="qml/global/ItemsOriginal.qml" line="487"/>
<source>Test Crash</source> <source>Test Crash</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -551,104 +550,104 @@
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="307"/> <location filename="qml/window/MainWindow.qml" line="311"/>
<source>Dark Mode</source> <source>Dark Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="83"/> <location filename="qml/window/MainWindow.qml" line="87"/>
<location filename="qml/window/MainWindow.qml" line="91"/> <location filename="qml/window/MainWindow.qml" line="95"/>
<source>Quit</source> <source>Quit</source>
<translation type="unfinished">退</translation> <translation type="unfinished">退</translation>
</message> </message>
<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> <source>Are you sure you want to exit the program?</source>
<translation type="unfinished">退</translation> <translation type="unfinished">退</translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="85"/> <location filename="qml/window/MainWindow.qml" line="89"/>
<source>Minimize</source> <source>Minimize</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="88"/> <location filename="qml/window/MainWindow.qml" line="92"/>
<source>Friendly Reminder</source> <source>Friendly Reminder</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished">FluentUI </translation> <translation type="unfinished">FluentUI </translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="92"/> <location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="336"/> <location filename="qml/window/MainWindow.qml" line="340"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="103"/> <location filename="qml/window/MainWindow.qml" line="107"/>
<source>Open in Separate Window</source> <source>Open in Separate Window</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="200"/> <location filename="qml/window/MainWindow.qml" line="204"/>
<source>Click Time</source> <source>Click Time</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="210"/> <location filename="qml/window/MainWindow.qml" line="214"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="301"/> <location filename="qml/window/MainWindow.qml" line="305"/>
<source>Finish</source> <source>Finish</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="302"/> <location filename="qml/window/MainWindow.qml" line="306"/>
<source>Next</source> <source>Next</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="303"/> <location filename="qml/window/MainWindow.qml" line="307"/>
<source>Previous</source> <source>Previous</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="309"/> <location filename="qml/window/MainWindow.qml" line="313"/>
<source>Hide Easter eggs</source> <source>Hide Easter eggs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Try a few more clicks!!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="333"/> <location filename="qml/window/MainWindow.qml" line="337"/>
<source>Upgrade Tips</source> <source>Upgrade Tips</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>FluentUI is currently up to date </source>
<translation type="unfinished">FluentUI </translation> <translation type="unfinished">FluentUI </translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="334"/> <location filename="qml/window/MainWindow.qml" line="338"/>
<source> -- The current app version</source> <source> -- The current app version</source>
<translation type="unfinished"> -- </translation> <translation type="unfinished"> -- </translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="334"/> <location filename="qml/window/MainWindow.qml" line="338"/>
<source> <source>
Now go and download the new version Now go and download the new version
@ -661,17 +660,17 @@ Updated content:
</translation> </translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="337"/> <location filename="qml/window/MainWindow.qml" line="341"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>The current version is already the latest</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/window/MainWindow.qml" line="371"/> <location filename="qml/window/MainWindow.qml" line="375"/>
<source>The network is abnormal</source> <source>The network is abnormal</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1113,44 +1112,36 @@ Updated content:
<translation type="unfinished"> - &gt;</translation> <translation type="unfinished"> - &gt;</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="22"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="23"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="24"/>
<source>Color Picker</source> <source>Color Picker</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="25"/>
<source>Edit Color</source> <source>Edit Color</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="26"/>
<source>Red</source> <source>Red</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="27"/>
<source>Green</source> <source>Green</source>
<translation type="unfinished">绿</translation> <translation type="obsolete">绿</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="28"/>
<source>Blue</source> <source>Blue</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_ColorPicker.qml" line="29"/>
<source>Opacity</source> <source>Opacity</source>
<translation type="unfinished"></translation> <translation type="obsolete"></translation>
</message> </message>
</context> </context>
<context> <context>
@ -1393,22 +1384,22 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context> <context>
<name>T_Home</name> <name>T_Home</name>
<message> <message>
<location filename="qml/page/T_Home.qml" line="23"/> <location filename="qml/page/T_Home.qml" line="19"/>
<source>FluentUI GitHub</source> <source>FluentUI GitHub</source>
<translation type="unfinished">FluentUI GitHub</translation> <translation type="unfinished">FluentUI GitHub</translation>
</message> </message>
<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> <source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished">最新的 FluentUI 控件和样式</translation> <translation type="unfinished">最新的 FluentUI 控件和样式</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_Home.qml" line="32"/> <location filename="qml/page/T_Home.qml" line="28"/>
<source>FluentUI Initializr</source> <source>FluentUI Initializr</source>
<translation type="unfinished">FluentUI脚手架</translation> <translation type="unfinished">FluentUI脚手架</translation>
</message> </message>
<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> <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> <translation type="unfinished">FluentUI 脚手架是一个快速创建项目工具,可帮助您创建和自定义具有各种选项的 Fluent UI 项目</translation>
</message> </message>
@ -2061,24 +2052,20 @@ Some contents...</source>
<translation type="unfinished">状态布局</translation> <translation type="unfinished">状态布局</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_StatusLayout.qml" line="63"/>
<source>Loading...</source> <source>Loading...</source>
<translation type="unfinished">正在加载...</translation> <translation type="obsolete">正在加载...</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_StatusLayout.qml" line="64"/>
<source>Empty</source> <source>Empty</source>
<translation type="unfinished">空空如也</translation> <translation type="obsolete">空空如也</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_StatusLayout.qml" line="65"/>
<source>The page went wrong...</source> <source>The page went wrong...</source>
<translation type="unfinished">页面出错了...</translation> <translation type="obsolete">页面出错了...</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_StatusLayout.qml" line="66"/>
<source>Reload</source> <source>Reload</source>
<translation type="unfinished">重新加载</translation> <translation type="obsolete">重新加载</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2504,22 +2491,22 @@ Some contents...</source>
<translation type="obsolete">共计选中%1条数据</translation> <translation type="obsolete">共计选中%1条数据</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="230"/> <location filename="qml/page/T_TreeView.qml" line="183"/>
<source>Title</source> <source>Title</source>
<translation type="unfinished">标题</translation> <translation type="unfinished">标题</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="242"/> <location filename="qml/page/T_TreeView.qml" line="195"/>
<source>Address</source> <source>Address</source>
<translation type="unfinished">地址</translation> <translation type="unfinished">地址</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="238"/> <location filename="qml/page/T_TreeView.qml" line="191"/>
<source>Avatar</source> <source>Avatar</source>
<translation type="unfinished">头像</translation> <translation type="unfinished">头像</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TreeView.qml" line="234"/> <location filename="qml/page/T_TreeView.qml" line="187"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished">名称</translation> <translation type="unfinished">名称</translation>
</message> </message>

View File

@ -483,12 +483,6 @@ FluObject{
FluRouter.navigate("/hotload") FluRouter.navigate("/hotload")
} }
} }
FluPaneItem{
title: qsTr("3D")
menuDelegate: paneItemMenu
url: "qrc:/example/qml/page/T_3D.qml"
onTap: { navigationView.push(url) }
}
FluPaneItem{ FluPaneItem{
title: qsTr("Test Crash") title: qsTr("Test Crash")
onTapListener: function(){ onTapListener: function(){

View File

@ -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
}
}
}

View File

@ -18,16 +18,7 @@ FluScrollablePage{
text: qsTr("Click to Select a Color - >") text: qsTr("Click to Select a Color - >")
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
} }
FluColorPicker{ 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")
}
} }
} }
CodeExpander{ CodeExpander{

View File

@ -12,10 +12,6 @@ FluScrollablePage{
animationEnabled: false animationEnabled: false
header: Item{} header: Item{}
FluentInitializrWindow{
id:fluent_Initializr
}
ListModel{ ListModel{
id: model_header id: model_header
ListElement{ ListElement{

View File

@ -24,7 +24,7 @@ FluContentPage {
leftMargin: 14 leftMargin: 14
} }
onClicked: { onClicked: {
grid_view.model = FluTheme.awesomeList(text_box.text) grid_view.model = FluApp.iconDatas(text_box.text)
} }
} }
GridView{ GridView{
@ -33,7 +33,7 @@ FluContentPage {
cellHeight: 110 cellHeight: 110
clip: true clip: true
boundsBehavior: GridView.StopAtBounds boundsBehavior: GridView.StopAtBounds
model:FluTheme.awesomeList() model: FluApp.iconDatas()
ScrollBar.vertical: FluScrollBar {} ScrollBar.vertical: FluScrollBar {}
anchors{ anchors{
topMargin: 10 topMargin: 10

View File

@ -60,12 +60,8 @@ FluScrollablePage{
FluStatusLayout{ FluStatusLayout{
id:status_view id:status_view
anchors.fill: parent anchors.fill: parent
loadingText: qsTr("Loading...")
emptyText: qsTr("Empty")
errorText: qsTr("The page went wrong...")
errorButtonText: qsTr("Reload")
onErrorClicked:{ onErrorClicked:{
showError("Click Reload") status_view.statusMode = FluStatusLayoutType.Loading
} }
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent

View File

@ -13,7 +13,7 @@ FluScrollablePage{
FluFrame{ FluFrame{
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 400 Layout.preferredHeight: 408
padding: 10 padding: 10
ColumnLayout{ ColumnLayout{

View File

@ -10,7 +10,6 @@ FluContentPage {
title: qsTr("TreeView") title: qsTr("TreeView")
function treeData(){ function treeData(){
const names = ["孙悟空", "猪八戒", "沙和尚", "唐僧","白骨夫人","金角大王","熊山君","黄风怪","银角大王"] const names = ["孙悟空", "猪八戒", "沙和尚", "唐僧","白骨夫人","金角大王","熊山君","黄风怪","银角大王"]
function getRandomName(){ function getRandomName(){
@ -29,7 +28,7 @@ FluContentPage {
} }
const dig = (path = '0', level = 5) => { const dig = (path = '0', level = 5) => {
const list = []; const list = [];
for (let i = 0; i < 5; i += 1) { for (let i = 0; i < 4; i += 1) {
const key = `${path}-${i}`; const key = `${path}-${i}`;
const treeNode = { const treeNode = {
title: key, title: key,
@ -48,67 +47,6 @@ FluContentPage {
return dig(); 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{ Component{
id:com_avatar id:com_avatar
Item{ 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{ anchors{
left: parent.left left: parent.left
top: layout_controls.bottom top: layout_controls.bottom
@ -218,36 +171,35 @@ FluContentPage {
bottom: parent.bottom bottom: parent.bottom
right: parent.right right: parent.right
} }
FluTreeView{ cellHeight: slider_cell_height.value
id:tree_view showLine: switch_showline.checked
anchors.fill: parent checkable:switch_checkable.checked
cellHeight: slider_cell_height.value depthPadding: slider_depth_padding.value
showLine: switch_showline.checked onCurrentChanged: {
checkable:switch_checkable.checked showInfo(current.data.title)
depthPadding: slider_depth_padding.value }
columnSource:[ columnSource:[
{ {
title: qsTr("Title"), title: qsTr("Title"),
dataIndex: 'title', dataIndex: 'title',
width: 300 width: 300
},{ },{
title: qsTr("Name"), title: qsTr("Name"),
dataIndex: 'name', dataIndex: 'name',
width: 100 width: 100
},{ },{
title: qsTr("Avatar"), title: qsTr("Avatar"),
dataIndex: 'avatar', dataIndex: 'avatar',
width: 100 width: 100
},{ },{
title: qsTr("Address"), title: qsTr("Address"),
dataIndex: 'address', dataIndex: 'address',
width: 200 width: 200
}, },
] ]
Component.onCompleted: { Component.onCompleted: {
var data = treeData() var data = treeData()
dataSource = data dataSource = data
}
} }
} }
} }

View File

@ -20,7 +20,7 @@ FluWindowDialog {
showError(message) showError(message)
} }
function onSuccess(path){ function onSuccess(path){
FluTools.showFileInFolder(path+"/CMakeLists.txt") FluTools.showFileInFolder(path)
window.close() window.close()
} }
} }

View File

@ -15,7 +15,7 @@ FluWindow {
title: "FluentUI" title: "FluentUI"
width: 1000 width: 1000
height: 680 height: 680
minimumWidth: 520 minimumWidth: 1000
minimumHeight: 200 minimumHeight: 200
launchMode: FluWindowType.SingleTask launchMode: FluWindowType.SingleTask
fitsAppBarWindows: true fitsAppBarWindows: true
@ -28,6 +28,10 @@ FluWindow {
z:7 z:7
} }
FluentInitializrWindow{
id:fluent_Initializr
}
FluEvent{ FluEvent{
name: "checkUpdate" name: "checkUpdate"
onTriggered: { onTriggered: {

View File

@ -15,7 +15,7 @@ public:
void paint(QPainter *painter) override; void paint(QPainter *painter) override;
Q_INVOKABLE [[maybe_unused]] void start(int w, int h, const QPoint &center, int radius); [[maybe_unused]] Q_INVOKABLE void start(int w, int h, const QPoint &center, int radius);
Q_SIGNAL void imageChanged(); Q_SIGNAL void imageChanged();

View File

@ -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/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/logo.ico.in", projectDir.filePath("src/logo.ico"));
copyFile(":/example/res/template/src/README.md.in", projectDir.filePath("src/README.md")); copyFile(":/example/res/template/src/README.md.in", projectDir.filePath("src/README.md"));
return this->success(projectPath); return this->success(projectPath+"/CMakeLists.txt");
} }

View File

@ -22,7 +22,7 @@ SINGLETON(InitializrHelper)
~InitializrHelper() override; ~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); Q_SIGNAL void error(const QString &message);

View File

@ -54,7 +54,7 @@ int main(int argc, char *argv[])
QGuiApplication::setOrganizationName("ZhuZiChu"); QGuiApplication::setOrganizationName("ZhuZiChu");
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
QGuiApplication::setApplicationName("FluentUI"); QGuiApplication::setApplicationName("FluentUI");
QGuiApplication::setApplicationDisplayName("FluentUI Exmaple"); QGuiApplication::setApplicationDisplayName("FluentUI Example");
QGuiApplication::setApplicationVersion(APPLICATION_VERSION); QGuiApplication::setApplicationVersion(APPLICATION_VERSION);
QGuiApplication::setQuitOnLastWindowClosed(false); QGuiApplication::setQuitOnLastWindowClosed(false);
SettingsHelper::getInstance()->init(argv); SettingsHelper::getInstance()->init(argv);

View File

@ -1,5 +1,4 @@
#include "FluAccentColor.h" #include "FluAccentColor.h"
FluAccentColor::FluAccentColor(QObject *parent) : QObject{parent} { FluAccentColor::FluAccentColor(QObject *parent) : QObject{parent} {
} }

View File

@ -9,6 +9,7 @@
#include <QClipboard> #include <QClipboard>
#include <QTranslator> #include <QTranslator>
#include <utility> #include <utility>
#include "FluentIconDef.h"
FluApp::FluApp(QObject *parent) : QObject{parent} { FluApp::FluApp(QObject *parent) : QObject{parent} {
_useSystemAppBar = false; _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;
}

View File

@ -8,6 +8,7 @@
#include <QQmlEngine> #include <QQmlEngine>
#include <QTranslator> #include <QTranslator>
#include <QQuickWindow> #include <QQuickWindow>
#include <QJsonArray>
#include "stdafx.h" #include "stdafx.h"
#include "singleton.h" #include "singleton.h"
@ -35,6 +36,8 @@ SINGLETON(FluApp)
Q_INVOKABLE void init(QObject *target, QLocale locale = QLocale::system()); Q_INVOKABLE void init(QObject *target, QLocale locale = QLocale::system());
[[maybe_unused]] Q_INVOKABLE static QJsonArray iconDatas(const QString &keyword = "");
private: private:
QQmlEngine *_engine{}; QQmlEngine *_engine{};
QTranslator *_translator = nullptr; QTranslator *_translator = nullptr;

View File

@ -109,7 +109,7 @@ FluColors::FluColors(QObject *parent) : QObject{parent} {
_Green = green; _Green = green;
} }
[[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor& primaryColor) { [[maybe_unused]] FluAccentColor *FluColors::createAccentColor(const QColor &primaryColor) {
auto accentColor = new FluAccentColor(this); auto accentColor = new FluAccentColor(this);
accentColor->normal(primaryColor); accentColor->normal(primaryColor);
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9)); accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor, 0.9));

View File

@ -55,7 +55,7 @@ private:
public: public:
SINGLETON(FluColors) 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(); } static FluColors *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
}; };

View File

@ -4,6 +4,7 @@
#include <QGuiApplication> #include <QGuiApplication>
#include <QScreen> #include <QScreen>
#include <QDateTime> #include <QDateTime>
#include "FluTools.h"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#pragma comment (lib, "user32.lib") #pragma comment (lib, "user32.lib")
@ -13,6 +14,7 @@
#include <windowsx.h> #include <windowsx.h>
#include <dwmapi.h> #include <dwmapi.h>
static inline QByteArray qtNativeEventType() { static inline QByteArray qtNativeEventType() {
static const auto result = "windows_generic_MSG"; static const auto result = "windows_generic_MSG";
return result; return result;
@ -55,6 +57,7 @@ FluFrameless::FluFrameless(QQuickItem *parent) : QQuickItem{parent} {
_closeButton = nullptr; _closeButton = nullptr;
_topmost = false; _topmost = false;
_disabled = false; _disabled = false;
_isWindows11OrGreater = FluTools::getInstance()->isWindows11OrGreater();
} }
FluFrameless::~FluFrameless() = default; FluFrameless::~FluFrameless() = default;
@ -67,6 +70,8 @@ void FluFrameless::componentComplete() {
if (_disabled) { if (_disabled) {
return; return;
} }
int w = window()->width();
int h = window()->height();
_current = window()->winId(); _current = window()->winId();
window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint); window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
@ -107,6 +112,12 @@ void FluFrameless::componentComplete() {
::RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW); ::RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
}); });
#endif #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] { connect(this, &FluFrameless::topmostChanged, this, [this] {
_setWindowTopmost(topmost()); _setWindowTopmost(topmost());
}); });
@ -135,7 +146,7 @@ void FluFrameless::componentComplete() {
auto *wp = reinterpret_cast<WINDOWPOS *>(lParam); auto *wp = reinterpret_cast<WINDOWPOS *>(lParam);
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) { if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0) {
wp->flags |= SWP_NOCOPYBITS; 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 true;
} }
return false; return false;
@ -147,12 +158,15 @@ void FluFrameless::componentComplete() {
const LONG originalBottom = clientRect->bottom; const LONG originalBottom = clientRect->bottom;
const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam); const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam);
if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) { if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
*result = hitTestResult; *result = static_cast<QT_NATIVE_EVENT_RESULT_TYPE>(hitTestResult);
return true; return true;
} }
int offsetSize; int offsetSize;
bool isMaximum = ::IsZoomed(hwnd); 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()) { if (isMaximum || _isFullScreen()) {
offsetSize = 0; offsetSize = 0;
} else { } else {
@ -161,32 +175,34 @@ void FluFrameless::componentComplete() {
if (!isCompositionEnabled()) { if (!isCompositionEnabled()) {
offsetSize = 0; 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) { if (!isMaximum) {
clientRect->top = originalTop + offsetSize; clientRect->top = originalTop + offsetSize;
clientRect->bottom = originalBottom - offsetSize; clientRect->bottom = originalBottom - offsetSize;
clientRect->left = originalLeft + offsetSize; clientRect->left = originalLeft + offsetSize;
clientRect->right = originalRight - offsetSize; clientRect->right = originalRight - offsetSize;
} }
#else
clientRect->top = originalTop + offsetSize;
clientRect->bottom = originalBottom - offsetSize;
clientRect->left = originalLeft + offsetSize;
clientRect->right = originalRight - offsetSize;
#endif #endif
_setMaximizeHovered(false); _setMaximizeHovered(false);
*result = WVR_REDRAW; *result = WVR_REDRAW;
return true; return true;
} else if (uMsg == WM_NCHITTEST) { } else if (uMsg == WM_NCHITTEST) {
if (_hitMaximizeButton()) { if (_isWindows11OrGreater) {
if (*result == HTNOWHERE) { if (_hitMaximizeButton()) {
*result = HTZOOM; if (*result == HTNOWHERE) {
*result = HTZOOM;
}
_setMaximizeHovered(true);
return true;
} }
_setMaximizeHovered(true); _setMaximizeHovered(false);
return true; _setMaximizePressed(false);
} }
_setMaximizeHovered(false);
_setMaximizePressed(false);
*result = 0; *result = 0;
POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
POINT nativeLocalPos = nativeGlobalPos; POINT nativeLocalPos = nativeGlobalPos;
@ -228,14 +244,14 @@ void FluFrameless::componentComplete() {
} }
*result = HTCLIENT; *result = HTCLIENT;
return true; return true;
} else if (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN) { } else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN)) {
if (_hitMaximizeButton()) { if (_hitMaximizeButton()) {
QMouseEvent event = QMouseEvent(QEvent::MouseButtonPress, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); QMouseEvent event = QMouseEvent(QEvent::MouseButtonPress, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
QGuiApplication::sendEvent(_maximizeButton, &event); QGuiApplication::sendEvent(_maximizeButton, &event);
_setMaximizePressed(true); _setMaximizePressed(true);
return true; return true;
} }
} else if (uMsg == WM_NCLBUTTONUP || uMsg == WM_NCRBUTTONUP) { } else if (_isWindows11OrGreater && (uMsg == WM_NCLBUTTONUP || uMsg == WM_NCRBUTTONUP)) {
if (_hitMaximizeButton()) { if (_hitMaximizeButton()) {
QMouseEvent event = QMouseEvent(QEvent::MouseButtonRelease, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); QMouseEvent event = QMouseEvent(QEvent::MouseButtonRelease, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
QGuiApplication::sendEvent(_maximizeButton, &event); QGuiApplication::sendEvent(_maximizeButton, &event);
@ -246,19 +262,31 @@ void FluFrameless::componentComplete() {
*result = FALSE; *result = FALSE;
return true; return true;
} else if (uMsg == WM_NCACTIVATE) { } 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; return true;
} else if (uMsg == WM_GETMINMAXINFO) { } else if (uMsg == WM_GETMINMAXINFO) {
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam); 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 pixelRatio = window()->devicePixelRatio();
auto geometry = window()->screen()->availableGeometry(); auto geometry = window()->screen()->availableGeometry();
RECT rect; RECT rect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0); 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.x = rect.left - offsetXY.x();
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x(); minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2; minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;
minmaxInfo->ptMaxSize.y = qRound(geometry.height() * pixelRatio) + offsetXY.y() * 2; minmaxInfo->ptMaxSize.y = qRound(geometry.height() * pixelRatio) + offsetXY.y() * 2;
return false; return true;
#endif
} else if (uMsg == WM_NCRBUTTONDOWN) { } else if (uMsg == WM_NCRBUTTONDOWN) {
if (wParam == HTCAPTION) { if (wParam == HTCAPTION) {
_showSystemMenu(QCursor::pos()); _showSystemMenu(QCursor::pos());
@ -273,9 +301,11 @@ void FluFrameless::componentComplete() {
} else if (uMsg == WM_SYSCOMMAND) { } else if (uMsg == WM_SYSCOMMAND) {
if (wParam == SC_MINIMIZE) { if (wParam == SC_MINIMIZE) {
if (window()->transientParent()) { if (window()->transientParent()) {
window()->transientParent()->showMinimized(); auto _hwnd = reinterpret_cast<HWND>(window()->transientParent()->winId());
::ShowWindow(_hwnd, 2);
} else { } else {
window()->showMinimized(); auto _hwnd = reinterpret_cast<HWND>(window()->winId());
::ShowWindow(_hwnd, 2);
} }
return true; return true;
} }
@ -387,16 +417,21 @@ void FluFrameless::showMaximized() {
HWND hwnd = reinterpret_cast<HWND>(window()->winId()); HWND hwnd = reinterpret_cast<HWND>(window()->winId());
::ShowWindow(hwnd, 3); ::ShowWindow(hwnd, 3);
#else #else
window()->showMaximized(); window()->setVisibility(QQuickWindow::Maximized);
#endif #endif
} }
[[maybe_unused]] void FluFrameless::showMinimized() { [[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() { void FluFrameless::showNormal() {
window()->showNormal(); window()->setVisibility(QQuickWindow::Windowed);
} }
void FluFrameless::setHitTestVisible(QQuickItem *val) { void FluFrameless::setHitTestVisible(QQuickItem *val) {
@ -405,7 +440,6 @@ void FluFrameless::setHitTestVisible(QQuickItem *val) {
} }
} }
void FluFrameless::_setWindowTopmost(bool topmost) { void FluFrameless::_setWindowTopmost(bool topmost) {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
HWND hwnd = reinterpret_cast<HWND>(window()->winId()); HWND hwnd = reinterpret_cast<HWND>(window()->winId());

View File

@ -3,6 +3,7 @@
#include <QObject> #include <QObject>
#include <QQuickItem> #include <QQuickItem>
#include <QAbstractNativeEventFilter> #include <QAbstractNativeEventFilter>
#include <QQmlProperty>
#include "stdafx.h" #include "stdafx.h"
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
@ -72,5 +73,6 @@ private:
int _edges = 0; int _edges = 0;
int _margins = 8; int _margins = 8;
quint64 _clickTimer = 0; quint64 _clickTimer = 0;
bool _isWindows11OrGreater = false;
QList<QPointer<QQuickItem>> _hitTestList; QList<QPointer<QQuickItem>> _hitTestList;
}; };

View File

@ -3,8 +3,8 @@
#include <QGuiApplication> #include <QGuiApplication>
#include <QPalette> #include <QPalette>
#include <QImage> #include <QImage>
#include <QThreadPool>
#include "Def.h" #include "Def.h"
#include "FluentIconDef.h"
#include "FluColors.h" #include "FluColors.h"
#include "FluTools.h" #include "FluTools.h"
@ -24,15 +24,15 @@ FluTheme::FluTheme(QObject *parent) : QObject{parent} {
_blurBehindWindowEnabled = false; _blurBehindWindowEnabled = false;
QGuiApplication::instance()->installEventFilter(this); QGuiApplication::instance()->installEventFilter(this);
refreshColors(); refreshColors();
updateDesktopImage();
connect(this, &FluTheme::darkModeChanged, this, [=] { connect(this, &FluTheme::darkModeChanged, this, [=] {
Q_EMIT darkChanged(); Q_EMIT darkChanged();
}); });
connect(this, &FluTheme::darkChanged, this, [=] { refreshColors(); }); connect(this, &FluTheme::darkChanged, this, [=] { refreshColors(); });
connect(this, &FluTheme::accentColorChanged, 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(); Q_EMIT desktopImagePathChanged();
}); });
connect(this, &FluTheme::blurBehindWindowEnabledChanged, this, [=] { checkUpdateDesktopImage(); });
startTimer(1000); startTimer(1000);
} }
@ -47,8 +47,8 @@ void FluTheme::refreshColors() {
fontSecondaryColor(isDark ? QColor(222, 222, 222, 255) : QColor(102, 102, 102, 255)); fontSecondaryColor(isDark ? QColor(222, 222, 222, 255) : QColor(102, 102, 102, 255));
fontTertiaryColor(isDark ? QColor(200, 200, 200, 255) : QColor(153, 153, 153, 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)); 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))); frameColor(isDark ? QColor(56, 56, 56, qRound(255 * 0.8)) : QColor(243, 243, 243, qRound(255 * 0.8)));
frameActiveColor(isDark ? QColor(32, 32, 32, qRound(255 * 0.8)) : QColor(255, 255, 255, qRound(255 * 0.6))); 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))); 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))); 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))); 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; 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 { bool FluTheme::dark() const {
if (_darkMode == FluThemeType::DarkMode::Dark) { if (_darkMode == FluThemeType::DarkMode::Dark) {
return true; return true;
@ -90,18 +74,24 @@ bool FluTheme::dark() const {
} }
} }
void FluTheme::updateDesktopImage(){ void FluTheme::checkUpdateDesktopImage() {
auto path = FluTools::getInstance()->getWallpaperFilePath(); if (!_blurBehindWindowEnabled) {
if(_desktopImagePath != path){ return;
if(!_desktopImagePath.isEmpty()){
_watcher.removePath(_desktopImagePath);
}
desktopImagePath(path);
_watcher.addPath(path);
} }
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) void FluTheme::timerEvent(QTimerEvent *event) {
{ checkUpdateDesktopImage();
updateDesktopImage();
} }

View File

@ -1,5 +1,4 @@
#ifndef FLUTHEME_H #pragma once
#define FLUTHEME_H
#include <QObject> #include <QObject>
#include <QtQml/qqml.h> #include <QtQml/qqml.h>
@ -8,6 +7,7 @@
#include <QColor> #include <QColor>
#include <QTimer> #include <QTimer>
#include <QFileSystemWatcher> #include <QFileSystemWatcher>
#include <QMutex>
#include "FluAccentColor.h" #include "FluAccentColor.h"
#include "stdafx.h" #include "stdafx.h"
#include "singleton.h" #include "singleton.h"
@ -17,7 +17,7 @@
*/ */
class FluTheme : public QObject { class FluTheme : public QObject {
Q_OBJECT 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_P(FluAccentColor*, accentColor);
Q_PROPERTY_AUTO(QColor, primaryColor); Q_PROPERTY_AUTO(QColor, primaryColor);
Q_PROPERTY_AUTO(QColor, backgroundColor); Q_PROPERTY_AUTO(QColor, backgroundColor);
@ -48,19 +48,15 @@ private:
void refreshColors(); void refreshColors();
void updateBackgroundMainColor();
protected: protected:
void timerEvent(QTimerEvent *event) override; void timerEvent(QTimerEvent *event) override;
void updateDesktopImage(); void checkUpdateDesktopImage();
public: public:
SINGLETON(FluTheme) SINGLETON(FluTheme)
[[maybe_unused]] Q_INVOKABLE static QJsonArray awesomeList(const QString &keyword = "");
Q_SIGNAL void darkChanged(); Q_SIGNAL void darkChanged();
static FluTheme *create(QQmlEngine *, QJSEngine *) { return getInstance(); } static FluTheme *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
@ -70,6 +66,5 @@ SINGLETON(FluTheme)
private: private:
bool _systemDark; bool _systemDark;
QFileSystemWatcher _watcher; QFileSystemWatcher _watcher;
QMutex _mutex;
}; };
#endif // FLUTHEME_H

View File

@ -281,6 +281,18 @@ QString FluTools::getWallpaperFilePath() {
return path; 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 #else
return {}; return {};
#endif #endif

View File

@ -113,15 +113,7 @@ void FluTreeModel::checkRow(int row, bool checked) {
itemData->_checked = checked; itemData->_checked = checked;
} }
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0)); 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) { void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
@ -272,3 +264,13 @@ void FluTreeModel::allCollapse() {
_rows = _root->_children; _rows = _root->_children;
endResetModel(); endResetModel();
} }
QVariant FluTreeModel::selectionModel(){
QList<FluTreeNode *> data;
foreach (auto item, _dataSource) {
if (item->checked()) {
data.append(item);
}
}
return QVariant::fromValue(data);
}

View File

@ -89,7 +89,6 @@ public:
class FluTreeModel : public QAbstractItemModel { class FluTreeModel : public QAbstractItemModel {
Q_OBJECT Q_OBJECT
Q_PROPERTY_AUTO(int, dataSourceSize) Q_PROPERTY_AUTO(int, dataSourceSize)
Q_PROPERTY_AUTO(QList<FluTreeNode *>, selectionModel)
Q_PROPERTY_AUTO(QList<QVariantMap>, columnSource) Q_PROPERTY_AUTO(QList<QVariantMap>, columnSource)
QML_NAMED_ELEMENT(FluTreeModel) QML_NAMED_ELEMENT(FluTreeModel)
QML_ADDED_IN_MINOR_VERSION(1) QML_ADDED_IN_MINOR_VERSION(1)
@ -141,6 +140,8 @@ public:
Q_INVOKABLE void allCollapse(); Q_INVOKABLE void allCollapse();
Q_INVOKABLE QVariant selectionModel();
private: private:
QList<FluTreeNode *> _rows; QList<FluTreeNode *> _rows;
QList<FluTreeNode *> _dataSource; QList<FluTreeNode *> _dataSource;

View File

@ -8,7 +8,7 @@ Item {
property real tintOpacity: 0.65 property real tintOpacity: 0.65
property real luminosity: 0.01 property real luminosity: 0.01
property real noiseOpacity: 0.02 property real noiseOpacity: 0.02
property var target property alias target : effect_source.sourceItem
property int blurRadius: 32 property int blurRadius: 32
property rect targetRect: Qt.rect(control.x, control.y, control.width,control.height) property rect targetRect: Qt.rect(control.x, control.y, control.width,control.height)
ShaderEffectSource { ShaderEffectSource {
@ -16,7 +16,6 @@ Item {
anchors.fill: parent anchors.fill: parent
visible: false visible: false
sourceRect: control.targetRect sourceRect: control.targetRect
sourceItem: control.target
} }
FastBlur { FastBlur {
id: fast_blur id: fast_blur

View File

@ -14,7 +14,7 @@ Rectangle{
property string closeText : qsTr("Close") property string closeText : qsTr("Close")
property string stayTopText : qsTr("Sticky on Top") property string stayTopText : qsTr("Sticky on Top")
property string stayTopCancelText : qsTr("Sticky on Top cancelled") 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 minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.itemPressColor property color minimizePressColor: FluTheme.itemPressColor
@ -22,7 +22,7 @@ Rectangle{
property color maximizeHoverColor: FluTheme.itemHoverColor property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.itemPressColor property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0) 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 color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
property bool showDark: false property bool showDark: false
property bool showClose: true property bool showClose: true

View File

@ -59,12 +59,8 @@ FluTextBox{
duration: FluTheme.animationEnabled ? 83 : 0 duration: FluTheme.animationEnabled ? 83 : 0
} }
} }
contentItem: FluRectangle{ contentItem: FluClip{
radius: [4,4,4,4] radius: [5,5,5,5]
FluShadow{
radius: 4
}
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
ListView{ ListView{
id:list_view id:list_view
anchors.fill: parent anchors.fill: parent
@ -97,10 +93,13 @@ FluTextBox{
radius:4 radius:4
} }
color: { color: {
if(hovered){ if(pressed){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) 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{ contentItem: FluText{
@ -112,22 +111,28 @@ FluTextBox{
} }
} }
} }
background: Item{ background:Rectangle{
id:container id: rect_background
implicitWidth: control.width implicitWidth: control.width
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8) 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: { onTextChanged: {
d.loadData() d.loadData()
if(d.flagVisible){ if(d.flagVisible){
var pos = control.mapToItem(null, 0, 0) 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 control_popup.y = control.height
} else if(pos.y>container.implicitHeight){ } else if(pos.y>rect_background.implicitHeight){
control_popup.y = -container.implicitHeight control_popup.y = -rect_background.implicitHeight
} else { } 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 control_popup.visible = true
} }

View File

@ -57,12 +57,12 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
color: { color: {
if(item_mouse.pressed){ 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){ 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{ MouseArea{
id:item_mouse id:item_mouse

File diff suppressed because it is too large Load Diff

View File

@ -13,16 +13,15 @@ Button{
property color current : Qt.rgba(1,1,1,1) property color current : Qt.rgba(1,1,1,1)
signal accepted() signal accepted()
property int colorHandleRadius: 8 property int colorHandleRadius: 8
property string cancelText: "取消" property string cancelText: qsTr("Cancel")
property string okText: "确定" property string okText: qsTr("OK")
property string titleText: "颜色选择器" property string titleText: qsTr("Color Picker")
property string editText: "编辑颜色" property string editText: qsTr("Edit Color")
property string redText: "红色" property string redText: qsTr("Red")
property string greenText: "绿色" property string greenText: qsTr("Green")
property string blueText: "蓝色" property string blueText: qsTr("Blue")
property string opacityText: "透明度" property string opacityText: qsTr("Opacity")
background: background: Rectangle{
Rectangle{
id:layout_color id:layout_color
radius: 5 radius: 5
color:"#00000000" color:"#00000000"

View File

@ -134,10 +134,9 @@ T.ComboBox {
} }
} }
background:Rectangle{ 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 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{ FluShadow{
radius: 5 radius: 5
} }

View File

@ -4,7 +4,6 @@ import QtQuick.Layouts 1.15
import QtQuick.Window 2.15 import QtQuick.Window 2.15
import FluentUI 1.0 import FluentUI 1.0
FluButton { FluButton {
property bool showYear: true property bool showYear: true
property var current property var current
@ -96,8 +95,6 @@ FluButton {
Menu{ Menu{
id:popup id:popup
modal: true modal: true
width: container.width
height: container.height
Overlay.modal: Item {} Overlay.modal: Item {}
enter: Transition { enter: Transition {
reversible: true reversible: true
@ -116,227 +113,220 @@ FluButton {
duration: FluTheme.animationEnabled ? 83 : 0 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{ FluShadow{
radius: 4 radius: 5
} }
} }
contentItem: Item{ contentItem: Item{
clip: true id:container
Rectangle{ implicitHeight: 340
id:container implicitWidth: 300
radius: 4 MouseArea{
width: 300 anchors.fill: parent
height: 340 }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) RowLayout{
MouseArea{ id:layout_content
anchors.fill: parent spacing: 0
} width: parent.width
FluShadow{ height: 280
radius: 4 Component{
} id:list_delegate
RowLayout{ Item{
id:layout_content height: 38
spacing: 0 width: getListView().width
width: parent.width function getListView(){
height: 300 if(type === 0)
Component{ return list_view_1
id:list_delegate if(type === 1)
Item{ return list_view_2
height:38 if(type === 2)
width:getListView().width return list_view_3
function getListView(){ }
if(type === 0) Rectangle{
return list_view_1 anchors.fill: parent
if(type === 1) anchors.topMargin: 2
return list_view_2 anchors.bottomMargin: 2
if(type === 2) anchors.leftMargin: 5
return list_view_3 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.fill: parent
anchors.topMargin: 2 hoverEnabled: true
anchors.bottomMargin: 2 onClicked: {
anchors.leftMargin: 5 getListView().currentIndex = position
anchors.rightMargin: 5 if(type === 0){
color: { 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(getListView().currentIndex === position){
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor if(FluTheme.dark){
} return Qt.rgba(0,0,0,1)
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)
}
}else{ }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 ListView{
width: 100 id:list_view_1
height: parent.height Layout.preferredWidth: 100
boundsBehavior:Flickable.StopAtBounds Layout.preferredHeight: parent.height - 2
ScrollBar.vertical: FluScrollBar {} Layout.alignment: Qt.AlignVCenter
model: generateYearArray(1924,2048) boundsBehavior:Flickable.StopAtBounds
clip: true ScrollBar.vertical: FluScrollBar {}
preferredHighlightBegin: 0 model: generateYearArray(1924,2048)
preferredHighlightEnd: 0 clip: true
highlightMoveDuration: 0 preferredHighlightBegin: 0
visible: showYear preferredHighlightEnd: 0
delegate: FluLoader{ highlightMoveDuration: 0
property var model: modelData visible: showYear
property int type:0 delegate: FluLoader{
property int position:index property var model: modelData
sourceComponent: list_delegate 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
}
} }
} }
Rectangle{ Rectangle{
width: parent.width Layout.preferredWidth: 1
height: 1 Layout.preferredHeight: parent.height
anchors.top: layout_content.bottom 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 color: control.dividerColor
} }
Rectangle{ ListView{
id:layout_actions id:list_view_3
height: 40 Layout.preferredWidth: showYear ? 99 : 150
radius: 5 Layout.preferredHeight: parent.height - 2
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) 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{ anchors{
bottom:parent.bottom
left: parent.left left: parent.left
leftMargin: 20
rightMargin: 10
right: divider.left
verticalCenter: parent.verticalCenter
}
text: control.cancelText
onClicked: {
popup.close()
}
}
FluFilledButton{
anchors{
right: parent.right right: parent.right
left: divider.right
rightMargin: 20
leftMargin: 10
verticalCenter: parent.verticalCenter
} }
Item { text: control.okText
id:divider onClicked: {
width: 1 d.changeFlag = false
height: parent.height popup.close()
anchors.centerIn: parent const year = text_year.text
} const month = text_month.text
FluButton{ const day = text_day.text
anchors{ const date = new Date()
left: parent.left date.setFullYear(parseInt(year));
leftMargin: 20 date.setMonth(parseInt(month) - 1);
rightMargin: 10 date.setDate(parseInt(day));
right: divider.left date.setHours(0);
verticalCenter: parent.verticalCenter date.setMinutes(0);
} date.setSeconds(0);
text: control.cancelText current = date
onClicked: { control.accepted()
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()
}
} }
} }
} }
@ -361,7 +351,7 @@ FluButton {
text_day.text = day text_day.text = day
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){ 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){ } else if(pos.y>container.height){
popup.y = -container.height popup.y = -container.height
} else { } else {

View File

@ -19,16 +19,20 @@ FluButton {
} }
iconColor:control.textColor iconColor:control.textColor
} }
Item{
id: d
property var window: Window.window
}
onClicked: { onClicked: {
if(menu.count !==0){ if(menu.count !==0){
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
var containerHeight = menu.count*36 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 menu.y = control.height
}else if(pos.y>containerHeight){ }else if(pos.y>containerHeight){
menu.y = -containerHeight menu.y = -containerHeight
}else{ }else{
menu.y = window.height-(pos.y+containerHeight) menu.y = d.window.height-(pos.y+containerHeight)
} }
menu.open() menu.open()
} }

View File

@ -44,8 +44,8 @@ T.Menu {
background: Rectangle { background: Rectangle {
implicitWidth: 150 implicitWidth: 150
implicitHeight: 36 implicitHeight: 36
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/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 ? 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.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
border.width: 1 border.width: 1
radius: 5 radius: 5
FluShadow{} FluShadow{}

View File

@ -8,11 +8,11 @@ Item{
id:control id:control
default property alias content: container.data default property alias content: container.data
property int statusMode: FluStatusLayoutType.Loading property int statusMode: FluStatusLayoutType.Loading
property string loadingText:"正在加载..." property string loadingText: qsTr("Loading...")
property string emptyText: "空空如也" property string emptyText: qsTr("Empty")
property string errorText: "页面出错了.." property string errorText: qsTr("Error")
property string errorButtonText: "重新加载" property string errorButtonText: qsTr("Reload")
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 color color: Qt.rgba(0,0,0,0)
signal errorClicked signal errorClicked
property Component loadingItem : com_loading property Component loadingItem : com_loading
property Component emptyItem : com_empty property Component emptyItem : com_empty

View File

@ -1,4 +1,5 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import Qt.labs.qmlmodels 1.0 import Qt.labs.qmlmodels 1.0
@ -17,7 +18,12 @@ Rectangle {
property color selectedBorderColor: FluTheme.primaryColor property color selectedBorderColor: FluTheme.primaryColor
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
id:control 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: { onColumnSourceChanged: {
if(columnSource.length!==0){ if(columnSource.length!==0){
var columns= [] var columns= []
@ -772,9 +778,9 @@ Rectangle {
timer_vertical_force_layout.restart() timer_vertical_force_layout.restart()
} }
Connections{ Connections{
target: table_model target: table_view
function onRowCountChanged(){ function onRowsChanged(){
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1})) header_row_model.rows = Array.from({length: table_view.rows}, (_, i) => ({rowIndex:i+1}))
} }
} }
Timer{ Timer{

View File

@ -23,16 +23,27 @@ FluControlBackground{
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor } GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor } GradientStop { position: 1.0; color: d.endColor }
} }
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1 bottomMargin: 1
QtObject{ QtObject{
id:d id:d
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3 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 startColor : FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: { property color endColor: {
if(!control.enabled){ if(!control.enabled){
return d.startColor 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
} }
} }
} }

View File

@ -111,8 +111,6 @@ FluButton {
} }
Menu{ Menu{
id:popup id:popup
width: container.width
height: container.height
modal: true modal: true
Overlay.modal: Item {} Overlay.modal: Item {}
enter: Transition { enter: Transition {
@ -132,224 +130,219 @@ FluButton {
duration: FluTheme.animationEnabled ? 83 : 0 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{ FluShadow{
radius: 4 radius: 5
} }
} }
contentItem: Item{ contentItem: Item{
clip: true id:container
Rectangle{ implicitHeight: 340
id:container implicitWidth: 300
height: 340 MouseArea{
width: 300 anchors.fill: parent
radius: 4 }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) RowLayout{
MouseArea{ id:layout_content
anchors.fill: parent spacing: 0
} width: parent.width
RowLayout{ height: 280
id:layout_content Component{
spacing: 0 id:list_delegate
width: parent.width Item{
height: 300 height:38
Component{ width:getListView().width
id:list_delegate function getListView(){
Item{ if(type === 0)
height:38 return list_view_1
width:getListView().width if(type === 1)
function getListView(){ return list_view_2
if(type === 0) if(type === 2)
return list_view_1 return list_view_3
if(type === 1) }
return list_view_2 Rectangle{
if(type === 2) anchors.fill: parent
return list_view_3 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.fill: parent
anchors.topMargin: 2 hoverEnabled: true
anchors.bottomMargin: 2 onClicked: {
anchors.leftMargin: 5 getListView().currentIndex = position
anchors.rightMargin: 5 if(type === 0){
color: { 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(getListView().currentIndex === position){
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor if(FluTheme.dark){
} return Qt.rgba(0,0,0,1)
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)
}
}else{ }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 ListView{
width: isH ? 100 : 150 id:list_view_1
height: parent.height Layout.preferredWidth: isH ? 100 : 150
boundsBehavior:Flickable.StopAtBounds Layout.preferredHeight: parent.height-2
ScrollBar.vertical: FluScrollBar {} Layout.alignment: Qt.AlignVCenter
preferredHighlightBegin: 0 boundsBehavior:Flickable.StopAtBounds
preferredHighlightEnd: 0 ScrollBar.vertical: FluScrollBar {}
highlightMoveDuration: 0 preferredHighlightBegin: 0
model: isH ? generateArray(1,12) : generateArray(0,23) preferredHighlightEnd: 0
clip: true highlightMoveDuration: 0
delegate: FluLoader{ model: isH ? generateArray(1,12) : generateArray(0,23)
property var model: modelData clip: true
property int type:0 delegate: FluLoader{
property int position:index property var model: modelData
sourceComponent: list_delegate 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
}
} }
} }
Rectangle{ Rectangle{
width: parent.width Layout.preferredWidth: 1
height: 1 Layout.preferredHeight: parent.height
anchors.top: layout_content.bottom
color: control.dividerColor 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{ Rectangle{
id:layout_actions width: 1
height: 40 height: parent.height
radius: 5 color: control.dividerColor
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) 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{ anchors{
bottom:parent.bottom
left: parent.left left: parent.left
leftMargin: 20
rightMargin: 10
right: divider.left
verticalCenter: parent.verticalCenter
}
text: control.cancelText
onClicked: {
popup.close()
}
}
FluFilledButton{
anchors{
right: parent.right right: parent.right
left: divider.right
rightMargin: 20
leftMargin: 10
verticalCenter: parent.verticalCenter
} }
Item { text: control.okText
id:divider onClicked: {
width: 1 d.changeFlag = false
height: parent.height popup.close()
anchors.centerIn: parent const hours = text_hour.text
} const minutes = text_minute.text
FluButton{ const period = text_ampm.text
anchors{ const date = new Date()
left: parent.left var hours24 = parseInt(hours);
leftMargin: 20 if(control.hourFormat === FluTimePickerType.H){
rightMargin: 10 if (hours === "12") {
right: divider.left hours24 = (period === control.amText) ? 0 : 12;
verticalCenter: parent.verticalCenter } else {
} hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
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;
}
} }
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) var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){ 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){ } else if(pos.y>container.height){
popup.y = -container.height popup.y = -container.height
} else { } else {

View File

@ -18,21 +18,28 @@ Rectangle {
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
readonly property alias current: d.current readonly property alias current: d.current
id:control 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: { onDataSourceChanged: {
tree_model.setDataSource(dataSource) tree_model.setDataSource(dataSource)
} }
onColumnSourceChanged: { onColumnSourceChanged: {
var columns= [] if(columnSource.length !== 0){
var headerRow = {} var columns= []
columnSource.forEach(function(item){ var headerRow = {}
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control); columnSource.forEach(function(item){
column.display = item.dataIndex var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
columns.push(column) column.display = item.dataIndex
headerRow[item.dataIndex] = item.title columns.push(column)
}) headerRow[item.dataIndex] = item.title
header_column_model.columns = columns })
header_column_model.rows = [headerRow] header_column_model.columns = columns
header_column_model.rows = [headerRow]
}
} }
FluTreeModel{ FluTreeModel{
id:tree_model id:tree_model
@ -710,9 +717,6 @@ Rectangle {
} }
} }
} }
function selectionModel(){
return tree_model.selectionModel
}
function count(){ function count(){
return tree_model.dataSourceSize return tree_model.dataSourceSize
} }
@ -741,4 +745,7 @@ Rectangle {
d.editPosition = undefined d.editPosition = undefined
d.editDelegate = undefined d.editDelegate = undefined
} }
function selectionModel(){
return tree_model.selectionModel()
}
} }

View File

@ -118,6 +118,8 @@ Window {
id:img_back id:img_back
visible: false visible: false
cache: false cache: false
fillMode: Image.PreserveAspectCrop
asynchronous: true
Component.onCompleted: { Component.onCompleted: {
var geometry = FluTools.desktopAvailableGeometry(window) var geometry = FluTools.desktopAvailableGeometry(window)
width = geometry.width width = geometry.width
@ -328,6 +330,12 @@ Window {
function showMaximized(){ function showMaximized(){
frameless.showMaximized() frameless.showMaximized()
} }
function showMinimized(){
frameless.showMinimized()
}
function showNormal(){
frameless.showNormal()
}
function showLoading(text = "",cancel = true){ function showLoading(text = "",cancel = true){
if(text===""){ if(text===""){
text = qsTr("Loading...") text = qsTr("Loading...")

View File

@ -32,9 +32,9 @@ FluWindow {
} }
} }
} }
function showDialog(){ function showDialog(offsetX=0,offsetY=0){
var x = transientParent.x + (transientParent.width - width)/2 var x = transientParent.x + (transientParent.width - width)/2 + offsetX
var y = transientParent.y + (transientParent.height - height)/2 var y = transientParent.y + (transientParent.height - height)/2 + offsetY
control.stayTop = Qt.binding(function(){return transientParent.stayTop}) control.stayTop = Qt.binding(function(){return transientParent.stayTop})
control.setGeometry(x,y,width,height) control.setGeometry(x,y,width,height)
control.visibility = Window.Windowed control.visibility = Window.Windowed

View File

@ -38,6 +38,12 @@ Module {
name: "init" name: "init"
Parameter { name: "target"; type: "QObject"; isPointer: true } Parameter { name: "target"; type: "QObject"; isPointer: true }
} }
Method {
name: "iconDatas"
type: "QJsonArray"
Parameter { name: "keyword"; type: "string" }
}
Method { name: "iconDatas"; type: "QJsonArray" }
} }
Component { Component {
name: "FluCalendarViewType" name: "FluCalendarViewType"
@ -133,10 +139,10 @@ Module {
exports: ["FluentUI/FluFrameless 1.0"] exports: ["FluentUI/FluFrameless 1.0"]
exportMetaObjectRevisions: [0] exportMetaObjectRevisions: [0]
Property { name: "appbar"; type: "QQuickItem"; isPointer: true } Property { name: "appbar"; type: "QQuickItem"; isPointer: true }
Property { name: "topmost"; type: "bool" }
Property { name: "maximizeButton"; type: "QQuickItem"; isPointer: true } Property { name: "maximizeButton"; type: "QQuickItem"; isPointer: true }
Property { name: "minimizedButton"; type: "QQuickItem"; isPointer: true } Property { name: "minimizedButton"; type: "QQuickItem"; isPointer: true }
Property { name: "closeButton"; type: "QQuickItem"; isPointer: true } Property { name: "closeButton"; type: "QQuickItem"; isPointer: true }
Property { name: "topmost"; type: "bool" }
Property { name: "disabled"; type: "bool" } Property { name: "disabled"; type: "bool" }
Property { name: "fixSize"; type: "bool" } Property { name: "fixSize"; type: "bool" }
Method { name: "showFullScreen" } Method { name: "showFullScreen" }
@ -318,18 +324,16 @@ Module {
Property { name: "fontSecondaryColor"; type: "QColor" } Property { name: "fontSecondaryColor"; type: "QColor" }
Property { name: "fontTertiaryColor"; type: "QColor" } Property { name: "fontTertiaryColor"; type: "QColor" }
Property { name: "itemNormalColor"; type: "QColor" } Property { name: "itemNormalColor"; type: "QColor" }
Property { name: "frameColor"; type: "QColor" }
Property { name: "frameActiveColor"; type: "QColor" }
Property { name: "itemHoverColor"; type: "QColor" } Property { name: "itemHoverColor"; type: "QColor" }
Property { name: "itemPressColor"; type: "QColor" } Property { name: "itemPressColor"; type: "QColor" }
Property { name: "itemCheckColor"; type: "QColor" } Property { name: "itemCheckColor"; type: "QColor" }
Property { name: "desktopImagePath"; type: "string" }
Property { name: "darkMode"; type: "int" } Property { name: "darkMode"; type: "int" }
Property { name: "nativeText"; type: "bool" } Property { name: "nativeText"; type: "bool" }
Property { name: "animationEnabled"; type: "bool" } Property { name: "animationEnabled"; type: "bool" }
Method { Property { name: "blurBehindWindowEnabled"; type: "bool" }
name: "awesomeList"
type: "QJsonArray"
Parameter { name: "keyword"; type: "string" }
}
Method { name: "awesomeList"; type: "QJsonArray" }
} }
Component { Component {
name: "FluThemeType" name: "FluThemeType"
@ -480,6 +484,18 @@ Module {
type: "QRect" type: "QRect"
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } 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 { Component {
name: "FluTreeModel" name: "FluTreeModel"
@ -487,7 +503,6 @@ Module {
exports: ["FluentUI/FluTreeModel 1.0"] exports: ["FluentUI/FluTreeModel 1.0"]
exportMetaObjectRevisions: [0] exportMetaObjectRevisions: [0]
Property { name: "dataSourceSize"; type: "int" } Property { name: "dataSourceSize"; type: "int" }
Property { name: "selectionModel"; type: "QList<FluTreeNode*>" }
Property { name: "columnSource"; type: "QList<QVariantMap>" } Property { name: "columnSource"; type: "QList<QVariantMap>" }
Method { Method {
name: "removeRows" name: "removeRows"
@ -504,6 +519,11 @@ Module {
type: "QObject*" type: "QObject*"
Parameter { name: "row"; type: "int" } Parameter { name: "row"; type: "int" }
} }
Method {
name: "setRow"
Parameter { name: "row"; type: "int" }
Parameter { name: "data"; type: "QVariantMap" }
}
Method { Method {
name: "setData" name: "setData"
Parameter { name: "data"; type: "QList<FluTreeNode*>" } Parameter { name: "data"; type: "QList<FluTreeNode*>" }
@ -541,6 +561,7 @@ Module {
} }
Method { name: "allExpand" } Method { name: "allExpand" }
Method { name: "allCollapse" } Method { name: "allCollapse" }
Method { name: "selectionModel"; type: "QVariant" }
} }
Component { Component {
name: "FluTreeViewType" name: "FluTreeViewType"
@ -584,12 +605,12 @@ Module {
} }
} }
Component { Component {
name: "Fluent_Awesome" name: "Fluent_Icons"
exports: ["FluentUI/FluentIcons 1.0"] exports: ["FluentUI/FluentIcons 1.0"]
isCreatable: false isCreatable: false
exportMetaObjectRevisions: [0] exportMetaObjectRevisions: [0]
Enum { Enum {
name: "Fluent_AwesomeType" name: "Fluent_IconType"
values: { values: {
"GlobalNavButton": 59136, "GlobalNavButton": 59136,
"Wifi": 59137, "Wifi": 59137,
@ -2421,37 +2442,37 @@ Module {
Property { name: "darkClickListener"; type: "QVariant" } Property { name: "darkClickListener"; type: "QVariant" }
Property { Property {
name: "buttonStayTop" name: "buttonStayTop"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "buttonMinimize" name: "buttonMinimize"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "buttonMaximize" name: "buttonMaximize"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "buttonClose" name: "buttonClose"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "buttonDark" name: "buttonDark"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "layoutMacosButtons" name: "layoutMacosButtons"
type: "FluLoader_QMLTYPE_12" type: "FluLoader_QMLTYPE_14"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
@ -3148,8 +3169,8 @@ Module {
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true } Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
Property { name: "topPadding"; type: "int" } Property { name: "topPadding"; type: "int" }
Property { name: "pageMode"; type: "int" } Property { name: "pageMode"; type: "int" }
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true } Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true }
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true } Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true }
Property { name: "navCompactWidth"; type: "int" } Property { name: "navCompactWidth"; type: "int" }
Property { name: "navTopMargin"; type: "int" } Property { name: "navTopMargin"; type: "int" }
Property { name: "cellHeight"; type: "int" } Property { name: "cellHeight"; type: "int" }
@ -3157,13 +3178,13 @@ Module {
Property { name: "hideNavAppBar"; type: "bool" } Property { name: "hideNavAppBar"; type: "bool" }
Property { Property {
name: "buttonMenu" name: "buttonMenu"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
Property { Property {
name: "buttonBack" name: "buttonBack"
type: "FluIconButton_QMLTYPE_19" type: "FluIconButton_QMLTYPE_20"
isReadonly: true isReadonly: true
isPointer: true isPointer: true
} }
@ -3975,21 +3996,23 @@ Module {
Property { name: "previousText"; type: "string" } Property { name: "previousText"; type: "string" }
} }
Component { Component {
prototype: "QQuickItem" prototype: "QQuickRectangle"
name: "FluentUI/FluTreeView 1.0" name: "FluentUI/FluTreeView 1.0"
exports: ["FluentUI/FluTreeView 1.0"] exports: ["FluentUI/FluTreeView 1.0"]
exportMetaObjectRevisions: [0] exportMetaObjectRevisions: [0]
isComposite: true isComposite: true
defaultProperty: "data" defaultProperty: "data"
Property { name: "currentIndex"; type: "int" }
Property { name: "dataSource"; type: "QVariant" } Property { name: "dataSource"; type: "QVariant" }
Property { name: "columnSource"; type: "QVariant" }
Property { name: "showLine"; type: "bool" } Property { name: "showLine"; type: "bool" }
Property { name: "draggable"; type: "bool" }
Property { name: "cellHeight"; type: "int" } Property { name: "cellHeight"; type: "int" }
Property { name: "depthPadding"; type: "int" } Property { name: "depthPadding"; type: "int" }
Property { name: "checkable"; type: "bool" } Property { name: "checkable"; type: "bool" }
Property { name: "lineColor"; type: "QColor" } 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: "count"; type: "QVariant" }
Method { name: "visibleCount"; type: "QVariant" } Method { name: "visibleCount"; type: "QVariant" }
Method { Method {
@ -4004,6 +4027,14 @@ Module {
} }
Method { name: "allExpand"; type: "QVariant" } Method { name: "allExpand"; type: "QVariant" }
Method { name: "allCollapse"; 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 { Component {
prototype: "QQuickWindowQmlImpl" prototype: "QQuickWindowQmlImpl"

View File

@ -14,7 +14,7 @@ Rectangle{
property string closeText : qsTr("Close") property string closeText : qsTr("Close")
property string stayTopText : qsTr("Sticky on Top") property string stayTopText : qsTr("Sticky on Top")
property string stayTopCancelText : qsTr("Sticky on Top cancelled") 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 minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.itemPressColor property color minimizePressColor: FluTheme.itemPressColor
@ -22,7 +22,7 @@ Rectangle{
property color maximizeHoverColor: FluTheme.itemHoverColor property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.itemPressColor property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0) 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 color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
property bool showDark: false property bool showDark: false
property bool showClose: true property bool showClose: true

View File

@ -58,12 +58,8 @@ FluTextBox{
duration: FluTheme.animationEnabled ? 83 : 0 duration: FluTheme.animationEnabled ? 83 : 0
} }
} }
contentItem: FluRectangle{ contentItem: FluClip{
radius: [4,4,4,4] radius: [5,5,5,5]
FluShadow{
radius: 4
}
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
ListView{ ListView{
id:list_view id:list_view
anchors.fill: parent anchors.fill: parent
@ -96,10 +92,13 @@ FluTextBox{
radius:4 radius:4
} }
color: { color: {
if(hovered){ if(pressed){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) 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{ contentItem: FluText{
@ -111,22 +110,28 @@ FluTextBox{
} }
} }
} }
background: Item{ background:Rectangle{
id:container id: rect_background
implicitWidth: control.width implicitWidth: control.width
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8) 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: { onTextChanged: {
d.loadData() d.loadData()
if(d.flagVisible){ if(d.flagVisible){
var pos = control.mapToItem(null, 0, 0) 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 control_popup.y = control.height
} else if(pos.y>container.implicitHeight){ } else if(pos.y>rect_background.implicitHeight){
control_popup.y = -container.implicitHeight control_popup.y = -rect_background.implicitHeight
} else { } 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 control_popup.visible = true
} }

View File

@ -57,12 +57,12 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
color: { color: {
if(item_mouse.pressed){ 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){ 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{ MouseArea{
id:item_mouse id:item_mouse

File diff suppressed because it is too large Load Diff

View File

@ -13,16 +13,15 @@ Button{
property color current : Qt.rgba(1,1,1,1) property color current : Qt.rgba(1,1,1,1)
signal accepted() signal accepted()
property int colorHandleRadius: 8 property int colorHandleRadius: 8
property string cancelText: "取消" property string cancelText: qsTr("Cancel")
property string okText: "确定" property string okText: qsTr("OK")
property string titleText: "颜色选择器" property string titleText: qsTr("Color Picker")
property string editText: "编辑颜色" property string editText: qsTr("Edit Color")
property string redText: "红色" property string redText: qsTr("Red")
property string greenText: "绿色" property string greenText: qsTr("Green")
property string blueText: "蓝色" property string blueText: qsTr("Blue")
property string opacityText: "透明度" property string opacityText: qsTr("Opacity")
background: background: Rectangle{
Rectangle{
id:layout_color id:layout_color
radius: 5 radius: 5
color:"#00000000" color:"#00000000"

View File

@ -134,10 +134,9 @@ T.ComboBox {
} }
} }
background:Rectangle{ 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 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{ FluShadow{
radius: 5 radius: 5
} }

View File

@ -41,7 +41,7 @@ FluButton {
id:divider_1 id:divider_1
width: 1 width: 1
x: parent.width/3 x: parent.width/3
height: parent.height-1 height: parent.height - 1
color: control.dividerColor color: control.dividerColor
visible: showYear visible: showYear
} }
@ -49,7 +49,7 @@ FluButton {
id:divider_2 id:divider_2
width: 1 width: 1
x: showYear ? parent.width*2/3 : parent.width/2 x: showYear ? parent.width*2/3 : parent.width/2
height: parent.height-1 height: parent.height - 1
color: control.dividerColor color: control.dividerColor
} }
FluText{ FluText{
@ -95,8 +95,6 @@ FluButton {
Menu{ Menu{
id:popup id:popup
modal: true modal: true
width: container.width
height: container.height
Overlay.modal: Item {} Overlay.modal: Item {}
enter: Transition { enter: Transition {
reversible: true reversible: true
@ -115,227 +113,220 @@ FluButton {
duration: FluTheme.animationEnabled ? 83 : 0 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{ FluShadow{
radius: 4 radius: 5
} }
} }
contentItem: Item{ contentItem: Item{
clip: true id:container
Rectangle{ implicitHeight: 340
id:container implicitWidth: 300
radius: 4 MouseArea{
width: 300 anchors.fill: parent
height: 340 }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) RowLayout{
MouseArea{ id:layout_content
anchors.fill: parent spacing: 0
} width: parent.width
FluShadow{ height: 280
radius: 4 Component{
} id:list_delegate
RowLayout{ Item{
id:layout_content height: 38
spacing: 0 width: getListView().width
width: parent.width function getListView(){
height: 300 if(type === 0)
Component{ return list_view_1
id:list_delegate if(type === 1)
Item{ return list_view_2
height:38 if(type === 2)
width:getListView().width return list_view_3
function getListView(){ }
if(type === 0) Rectangle{
return list_view_1 anchors.fill: parent
if(type === 1) anchors.topMargin: 2
return list_view_2 anchors.bottomMargin: 2
if(type === 2) anchors.leftMargin: 5
return list_view_3 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.fill: parent
anchors.topMargin: 2 hoverEnabled: true
anchors.bottomMargin: 2 onClicked: {
anchors.leftMargin: 5 getListView().currentIndex = position
anchors.rightMargin: 5 if(type === 0){
color: { 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(getListView().currentIndex === position){
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor if(FluTheme.dark){
} return Qt.rgba(0,0,0,1)
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)
}
}else{ }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 ListView{
width: 100 id:list_view_1
height: parent.height Layout.preferredWidth: 100
boundsBehavior:Flickable.StopAtBounds Layout.preferredHeight: parent.height - 2
ScrollBar.vertical: FluScrollBar {} Layout.alignment: Qt.AlignVCenter
model: generateYearArray(1924,2048) boundsBehavior:Flickable.StopAtBounds
clip: true ScrollBar.vertical: FluScrollBar {}
preferredHighlightBegin: 0 model: generateYearArray(1924,2048)
preferredHighlightEnd: 0 clip: true
highlightMoveDuration: 0 preferredHighlightBegin: 0
visible: showYear preferredHighlightEnd: 0
delegate: FluLoader{ highlightMoveDuration: 0
property var model: modelData visible: showYear
property int type:0 delegate: FluLoader{
property int position:index property var model: modelData
sourceComponent: list_delegate 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
}
} }
} }
Rectangle{ Rectangle{
width: parent.width Layout.preferredWidth: 1
height: 1 Layout.preferredHeight: parent.height
anchors.top: layout_content.bottom 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 color: control.dividerColor
} }
Rectangle{ ListView{
id:layout_actions id:list_view_3
height: 40 Layout.preferredWidth: showYear ? 99 : 150
radius: 5 Layout.preferredHeight: parent.height - 2
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) 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{ anchors{
bottom:parent.bottom
left: parent.left left: parent.left
leftMargin: 20
rightMargin: 10
right: divider.left
verticalCenter: parent.verticalCenter
}
text: control.cancelText
onClicked: {
popup.close()
}
}
FluFilledButton{
anchors{
right: parent.right right: parent.right
left: divider.right
rightMargin: 20
leftMargin: 10
verticalCenter: parent.verticalCenter
} }
Item { text: control.okText
id:divider onClicked: {
width: 1 d.changeFlag = false
height: parent.height popup.close()
anchors.centerIn: parent const year = text_year.text
} const month = text_month.text
FluButton{ const day = text_day.text
anchors{ const date = new Date()
left: parent.left date.setFullYear(parseInt(year));
leftMargin: 20 date.setMonth(parseInt(month) - 1);
rightMargin: 10 date.setDate(parseInt(day));
right: divider.left date.setHours(0);
verticalCenter: parent.verticalCenter date.setMinutes(0);
} date.setSeconds(0);
text: control.cancelText current = date
onClicked: { control.accepted()
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()
}
} }
} }
} }
@ -360,7 +351,7 @@ FluButton {
text_day.text = day text_day.text = day
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){ 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){ } else if(pos.y>container.height){
popup.y = -container.height popup.y = -container.height
} else { } else {

View File

@ -20,16 +20,20 @@ FluButton {
} }
iconColor:control.textColor iconColor:control.textColor
} }
Item{
id: d
property var window: Window.window
}
onClicked: { onClicked: {
if(menu.count !==0){ if(menu.count !==0){
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
var containerHeight = menu.count*36 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 menu.y = control.height
}else if(pos.y>containerHeight){ }else if(pos.y>containerHeight){
menu.y = -containerHeight menu.y = -containerHeight
}else{ }else{
menu.y = window.height-(pos.y+containerHeight) menu.y = d.window.height-(pos.y+containerHeight)
} }
menu.open() menu.open()
} }

View File

@ -44,8 +44,8 @@ T.Menu {
background: Rectangle { background: Rectangle {
implicitWidth: 150 implicitWidth: 150
implicitHeight: 36 implicitHeight: 36
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/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 ? 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.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1)
border.width: 1 border.width: 1
radius: 5 radius: 5
FluShadow{} FluShadow{}

View File

@ -7,11 +7,11 @@ Item{
id:control id:control
default property alias content: container.data default property alias content: container.data
property int statusMode: FluStatusLayoutType.Loading property int statusMode: FluStatusLayoutType.Loading
property string loadingText:"正在加载..." property string loadingText: qsTr("Loading...")
property string emptyText: "空空如也" property string emptyText: qsTr("Empty")
property string errorText: "页面出错了.." property string errorText: qsTr("Error")
property string errorButtonText: "重新加载" property string errorButtonText: qsTr("Reload")
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 color color: Qt.rgba(0,0,0,0)
signal errorClicked signal errorClicked
property Component loadingItem : com_loading property Component loadingItem : com_loading
property Component emptyItem : com_empty property Component emptyItem : com_empty

View File

@ -18,7 +18,12 @@ Rectangle {
property color selectedBorderColor: FluTheme.primaryColor property color selectedBorderColor: FluTheme.primaryColor
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
id:control 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: { onColumnSourceChanged: {
if(columnSource.length!==0){ if(columnSource.length!==0){
var columns= [] var columns= []
@ -773,9 +778,9 @@ Rectangle {
timer_vertical_force_layout.restart() timer_vertical_force_layout.restart()
} }
Connections{ Connections{
target: table_model target: table_view
function onRowCountChanged(){ function onRowsChanged(){
header_row_model.rows = Array.from({length: table_model.rows.length}, (_, i) => ({rowIndex:i+1})) header_row_model.rows = Array.from({length: table_view.rows}, (_, i) => ({rowIndex:i+1}))
} }
} }
Timer{ Timer{

View File

@ -23,16 +23,27 @@ FluControlBackground{
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor } GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor } GradientStop { position: 1.0; color: d.endColor }
} }
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1 bottomMargin: 1
QtObject{ QtObject{
id:d id:d
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3 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 startColor : FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: { property color endColor: {
if(!control.enabled){ if(!control.enabled){
return d.startColor 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
} }
} }
} }

View File

@ -58,14 +58,14 @@ FluButton {
id: divider_1 id: divider_1
width: 1 width: 1
x: isH ? parent.width/3 : parent.width/2 x: isH ? parent.width/3 : parent.width/2
height: parent.height-1 height: parent.height - 1
color: dividerColor color: dividerColor
} }
Rectangle{ Rectangle{
id: divider_2 id: divider_2
width: 1 width: 1
x: parent.width*2/3 x: parent.width*2/3
height: parent.height-1 height: parent.height - 1
color: dividerColor color: dividerColor
visible: isH visible: isH
} }
@ -111,8 +111,6 @@ FluButton {
} }
Menu{ Menu{
id:popup id:popup
width: container.width
height: container.height
modal: true modal: true
Overlay.modal: Item {} Overlay.modal: Item {}
enter: Transition { enter: Transition {
@ -132,224 +130,219 @@ FluButton {
duration: FluTheme.animationEnabled ? 83 : 0 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{ FluShadow{
radius: 4 radius: 5
} }
} }
contentItem: Item{ contentItem: Item{
clip: true id:container
Rectangle{ implicitHeight: 340
id:container implicitWidth: 300
height: 340 MouseArea{
width: 300 anchors.fill: parent
radius: 4 }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) RowLayout{
MouseArea{ id:layout_content
anchors.fill: parent spacing: 0
} width: parent.width
RowLayout{ height: 280
id:layout_content Component{
spacing: 0 id:list_delegate
width: parent.width Item{
height: 300 height:38
Component{ width:getListView().width
id:list_delegate function getListView(){
Item{ if(type === 0)
height:38 return list_view_1
width:getListView().width if(type === 1)
function getListView(){ return list_view_2
if(type === 0) if(type === 2)
return list_view_1 return list_view_3
if(type === 1) }
return list_view_2 Rectangle{
if(type === 2) anchors.fill: parent
return list_view_3 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.fill: parent
anchors.topMargin: 2 hoverEnabled: true
anchors.bottomMargin: 2 onClicked: {
anchors.leftMargin: 5 getListView().currentIndex = position
anchors.rightMargin: 5 if(type === 0){
color: { 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(getListView().currentIndex === position){
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor if(FluTheme.dark){
} return Qt.rgba(0,0,0,1)
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)
}
}else{ }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 ListView{
width: isH ? 100 : 150 id:list_view_1
height: parent.height Layout.preferredWidth: isH ? 100 : 150
boundsBehavior:Flickable.StopAtBounds Layout.preferredHeight: parent.height-2
ScrollBar.vertical: FluScrollBar {} Layout.alignment: Qt.AlignVCenter
preferredHighlightBegin: 0 boundsBehavior:Flickable.StopAtBounds
preferredHighlightEnd: 0 ScrollBar.vertical: FluScrollBar {}
highlightMoveDuration: 0 preferredHighlightBegin: 0
model: isH ? generateArray(1,12) : generateArray(0,23) preferredHighlightEnd: 0
clip: true highlightMoveDuration: 0
delegate: FluLoader{ model: isH ? generateArray(1,12) : generateArray(0,23)
property var model: modelData clip: true
property int type:0 delegate: FluLoader{
property int position:index property var model: modelData
sourceComponent: list_delegate 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
}
} }
} }
Rectangle{ Rectangle{
width: parent.width Layout.preferredWidth: 1
height: 1 Layout.preferredHeight: parent.height
anchors.top: layout_content.bottom
color: control.dividerColor 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{ Rectangle{
id:layout_actions width: 1
height: 40 height: parent.height
radius: 5 color: control.dividerColor
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) 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{ anchors{
bottom:parent.bottom
left: parent.left left: parent.left
leftMargin: 20
rightMargin: 10
right: divider.left
verticalCenter: parent.verticalCenter
}
text: control.cancelText
onClicked: {
popup.close()
}
}
FluFilledButton{
anchors{
right: parent.right right: parent.right
left: divider.right
rightMargin: 20
leftMargin: 10
verticalCenter: parent.verticalCenter
} }
Item { text: control.okText
id:divider onClicked: {
width: 1 d.changeFlag = false
height: parent.height popup.close()
anchors.centerIn: parent const hours = text_hour.text
} const minutes = text_minute.text
FluButton{ const period = text_ampm.text
anchors{ const date = new Date()
left: parent.left var hours24 = parseInt(hours);
leftMargin: 20 if(control.hourFormat === FluTimePickerType.H){
rightMargin: 10 if (hours === "12") {
right: divider.left hours24 = (period === control.amText) ? 0 : 12;
verticalCenter: parent.verticalCenter } else {
} hours24 = (period === control.pmText) ? hours24 : hours24 + 12;
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;
}
} }
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) var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){ 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){ } else if(pos.y>container.height){
popup.y = -container.height popup.y = -container.height
} else { } else {

View File

@ -18,7 +18,12 @@ Rectangle {
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
readonly property alias current: d.current readonly property alias current: d.current
id:control 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: { onDataSourceChanged: {
tree_model.setDataSource(dataSource) tree_model.setDataSource(dataSource)
} }
@ -710,9 +715,6 @@ Rectangle {
} }
} }
} }
function selectionModel(){
return tree_model.selectionModel
}
function count(){ function count(){
return tree_model.dataSourceSize return tree_model.dataSourceSize
} }
@ -741,4 +743,7 @@ Rectangle {
d.editPosition = undefined d.editPosition = undefined
d.editDelegate = undefined d.editDelegate = undefined
} }
function selectionModel(){
return tree_model.selectionModel()
}
} }

View File

@ -117,6 +117,8 @@ Window {
id:img_back id:img_back
visible: false visible: false
cache: false cache: false
fillMode: Image.PreserveAspectCrop
asynchronous: true
Component.onCompleted: { Component.onCompleted: {
var geometry = FluTools.desktopAvailableGeometry(window) var geometry = FluTools.desktopAvailableGeometry(window)
width = geometry.width width = geometry.width
@ -327,6 +329,12 @@ Window {
function showMaximized(){ function showMaximized(){
frameless.showMaximized() frameless.showMaximized()
} }
function showMinimized(){
frameless.showMinimized()
}
function showNormal(){
frameless.showNormal()
}
function showLoading(text = "",cancel = true){ function showLoading(text = "",cancel = true){
if(text===""){ if(text===""){
text = qsTr("Loading...") text = qsTr("Loading...")

View File

@ -32,9 +32,9 @@ FluWindow {
} }
} }
} }
function showDialog(){ function showDialog(offsetX=0,offsetY=0){
var x = transientParent.x + (transientParent.width - width)/2 var x = transientParent.x + (transientParent.width - width)/2 + offsetX
var y = transientParent.y + (transientParent.height - height)/2 var y = transientParent.y + (transientParent.height - height)/2 + offsetY
control.stayTop = Qt.binding(function(){return transientParent.stayTop}) control.stayTop = Qt.binding(function(){return transientParent.stayTop})
control.setGeometry(x,y,width,height) control.setGeometry(x,y,width,height)
control.visibility = Window.Windowed control.visibility = Window.Windowed

View File

@ -70,6 +70,57 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </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> <context>
<name>FluContentDialog</name> <name>FluContentDialog</name>
<message> <message>
@ -94,31 +145,31 @@
<context> <context>
<name>FluDatePicker</name> <name>FluDatePicker</name>
<message> <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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
<source>Year</source> <source>Year</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
<source>Month</source> <source>Month</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
<source>Day</source> <source>Day</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -181,6 +232,33 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </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> <context>
<name>FluTextBoxMenu</name> <name>FluTextBoxMenu</name>
<message> <message>
@ -212,31 +290,37 @@
<name>FluTimePicker</name> <name>FluTimePicker</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
<source>AM</source> <source>AM</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
<source>PM</source> <source>PM</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
<source>Hour</source> <source>Hour</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
<source>Minute</source> <source>Minute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -265,8 +349,8 @@
<context> <context>
<name>FluWindow</name> <name>FluWindow</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/> <location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="335"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/> <location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="334"/>
<source>Loading...</source> <source>Loading...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -70,6 +70,57 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </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> <context>
<name>FluContentDialog</name> <name>FluContentDialog</name>
<message> <message>
@ -94,31 +145,31 @@
<context> <context>
<name>FluDatePicker</name> <name>FluDatePicker</name>
<message> <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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="10"/>
<source>Year</source> <source>Year</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="11"/>
<source>Month</source> <source>Month</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="12"/>
<source>Day</source> <source>Day</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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"/> <location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -181,6 +232,33 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </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> <context>
<name>FluTextBoxMenu</name> <name>FluTextBoxMenu</name>
<message> <message>
@ -212,31 +290,37 @@
<name>FluTimePicker</name> <name>FluTimePicker</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="11"/>
<source>AM</source> <source>AM</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="12"/>
<source>PM</source> <source>PM</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="13"/>
<source>Hour</source> <source>Hour</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="14"/>
<source>Minute</source> <source>Minute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="15"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/> <location filename="Qt5/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTimePicker.qml" line="16"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -265,8 +349,8 @@
<context> <context>
<name>FluWindow</name> <name>FluWindow</name>
<message> <message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="285"/> <location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="335"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="284"/> <location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="334"/>
<source>Loading...</source> <source>Loading...</source>
<translation type="unfinished">...</translation> <translation type="unfinished">...</translation>
</message> </message>