Compare commits

..

17 Commits
1.7.0 ... 1.7.2

Author SHA1 Message Date
f8dee135a1 update 2024-03-15 22:40:41 +08:00
d2de626f78 update version 2024-03-15 22:18:35 +08:00
a184e6b7df update 2024-03-15 22:18:02 +08:00
7c4bedb907 update 2024-03-15 22:02:30 +08:00
2d2f991128 update 2024-03-15 22:00:47 +08:00
3f7555d4e6 update 2024-03-15 18:16:01 +08:00
9d5765eafe update 2024-03-15 12:19:38 +08:00
2dbbaa50f7 update 2024-03-15 00:15:52 +08:00
1c63d027bb update 2024-03-15 00:10:27 +08:00
479e21097c update FluCalendarPicker 2024-03-15 00:04:15 +08:00
874e861c64 update version 2024-03-14 10:01:56 +08:00
d420282dd8 update 2024-03-13 19:14:56 +08:00
099e966d9b update 2024-03-13 17:54:11 +08:00
e11f1a1232 update 2024-03-12 22:59:56 +08:00
80f8f5f01e update 2024-03-12 17:14:47 +08:00
cfb961408b update 2024-03-12 16:14:10 +08:00
3bfe4dd12c update 2024-03-12 12:19:14 +08:00
79 changed files with 2685 additions and 1955 deletions

View File

@ -199,12 +199,13 @@
<file>qml/page/T_SplitLayout.qml</file>
<file>qml/window/FluentInitalizrWindow.qml</file>
<file>res/template/CMakeLists.txt.in</file>
<file>res/template/App.qml.in</file>
<file>res/template/logo.ico.in</file>
<file>res/template/main.cpp.in</file>
<file>res/template/main.qml.in</file>
<file>res/template/qml.qrc.in</file>
<file>res/template/en_US.ts.in</file>
<file>res/template/zh_CN.ts.in</file>
<file>res/template/src/App.qml.in</file>
<file>res/template/src/CMakeLists.txt.in</file>
<file>res/template/src/en_US.ts.in</file>
<file>res/template/src/logo.ico.in</file>
<file>res/template/src/main.cpp.in</file>
<file>res/template/src/main.qml.in</file>
<file>res/template/src/qml.qrc.in</file>
<file>res/template/src/zh_CN.ts.in</file>
</qresource>
</RCC>

View File

@ -47,39 +47,39 @@
<name>FluentInitalizrWindow</name>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="30"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="30"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="51"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="51"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="59"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="59"/>
<source>Create In</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="63"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="63"/>
<source>Browse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="93"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="93"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="101"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="101"/>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
@ -102,22 +102,22 @@
<context>
<name>InitalizrHelper</name>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="73"/>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<source>The name cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<location filename="src/helper/InitalizrHelper.cpp" line="81"/>
<source>The creation path cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="82"/>
<location filename="src/helper/InitalizrHelper.cpp" line="86"/>
<source>The path does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="88"/>
<location filename="src/helper/InitalizrHelper.cpp" line="92"/>
<source>%1 folder already exists</source>
<translation type="unfinished"></translation>
</message>
@ -634,128 +634,126 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="24"/>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="24"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="320"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="320"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="97"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="104"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="96"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="104"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="97"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="98"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="99"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="99"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="101"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="101"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="101"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="101"/>
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="106"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="106"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="350"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="105"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="349"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="117"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="117"/>
<location filename="qml/window/MainWindow.qml" line="116"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="116"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="214"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="214"/>
<location filename="qml/window/MainWindow.qml" line="213"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="213"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="224"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="224"/>
<location filename="qml/window/MainWindow.qml" line="223"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="223"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="314"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="314"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="315"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="315"/>
<source>Finish</source>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="316"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="316"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="317"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="317"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="320"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="320"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="322"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="322"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="346"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="346"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source> -- The current app version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source>
Now go and download the new version
@ -764,20 +762,20 @@ Updated content:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="351"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="351"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="350"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="378"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="378"/>
<location filename="qml/window/MainWindow.qml" line="377"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="377"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="385"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="385"/>
<location filename="qml/window/MainWindow.qml" line="384"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="384"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>
@ -1380,48 +1378,33 @@ Updated content:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="27"/>
<location filename="qml/page/T_DatePicker.qml" line="61"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="27"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="61"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="56"/>
<source>Year</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="28"/>
<location filename="qml/page/T_DatePicker.qml" line="62"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="28"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="62"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="57"/>
<source>Month</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="29"/>
<location filename="qml/page/T_DatePicker.qml" line="63"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="29"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="63"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="58"/>
<source>Day</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="30"/>
<location filename="qml/page/T_DatePicker.qml" line="64"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="30"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="64"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="59"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="31"/>
<location filename="qml/page/T_DatePicker.qml" line="65"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="31"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="65"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="60"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="57"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="57"/>
<location filename="qml/page/T_DatePicker.qml" line="52"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="52"/>
<source>showYear=false</source>
<translation type="unfinished"></translation>
</message>
@ -1611,26 +1594,26 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Home</name>
<message>
<location filename="qml/page/T_Home.qml" line="17"/>
<location filename="qml-Qt6/page/T_Home.qml" line="17"/>
<location filename="qml/page/T_Home.qml" line="22"/>
<location filename="qml-Qt6/page/T_Home.qml" line="23"/>
<source>FluentUI GitHub</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="18"/>
<location filename="qml-Qt6/page/T_Home.qml" line="18"/>
<location filename="qml/page/T_Home.qml" line="23"/>
<location filename="qml-Qt6/page/T_Home.qml" line="24"/>
<source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="26"/>
<location filename="qml-Qt6/page/T_Home.qml" line="26"/>
<location filename="qml/page/T_Home.qml" line="31"/>
<location filename="qml-Qt6/page/T_Home.qml" line="32"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="27"/>
<location filename="qml-Qt6/page/T_Home.qml" line="27"/>
<location filename="qml/page/T_Home.qml" line="32"/>
<location filename="qml-Qt6/page/T_Home.qml" line="33"/>
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
<translation type="unfinished"></translation>
</message>
@ -1644,14 +1627,8 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Image.qml" line="27"/>
<location filename="qml-Qt6/page/T_Image.qml" line="27"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Image.qml" line="30"/>
<location filename="qml-Qt6/page/T_Image.qml" line="30"/>
<location filename="qml/page/T_Image.qml" line="29"/>
<location filename="qml-Qt6/page/T_Image.qml" line="29"/>
<source>The image failed to load, please reload</source>
<translation type="unfinished"></translation>
</message>
@ -1672,7 +1649,9 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
</message>
<message>
<location filename="qml/page/T_InfoBar.qml" line="26"/>
<location filename="qml/page/T_InfoBar.qml" line="50"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="26"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="50"/>
<source>This is an InfoBar in the Info Style</source>
<translation type="unfinished"></translation>
</message>
@ -1707,9 +1686,9 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_InfoBar.qml" line="56"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="56"/>
<source>Loading...</source>
<location filename="qml/page/T_InfoBar.qml" line="50"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="50"/>
<source>Manual shutdown is supported</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1945,26 +1924,6 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<source>Pagination</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Pagination.qml" line="24"/>
<location filename="qml/page/T_Pagination.qml" line="31"/>
<location filename="qml/page/T_Pagination.qml" line="38"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="24"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="31"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="38"/>
<source>&lt;Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Pagination.qml" line="25"/>
<location filename="qml/page/T_Pagination.qml" line="32"/>
<location filename="qml/page/T_Pagination.qml" line="39"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="25"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="32"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="39"/>
<source>Next&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>T_PieChart</name>
@ -2267,36 +2226,6 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<source>ShortcutPicker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="19"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="19"/>
<source>Activate the Shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="20"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="20"/>
<source>Press the key combination to change the shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="21"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="21"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="22"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="22"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="23"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="23"/>
<source>Reset</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>T_Slider</name>
@ -2766,80 +2695,62 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Tour</name>
<message>
<location filename="qml/page/T_Tour.qml" line="14"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="14"/>
<source>Finish</source>
<location filename="qml/page/T_Tour.qml" line="15"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="15"/>
<source>Upload File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="15"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="15"/>
<source>Next</source>
<source>Put your files here.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="16"/>
<location filename="qml/page/T_Tour.qml" line="53"/>
<location filename="qml/page/T_Tour.qml" line="55"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="16"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="53"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="55"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="16"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="16"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="18"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="18"/>
<source>Upload File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="18"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="18"/>
<source>Put your files here.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="19"/>
<location filename="qml/page/T_Tour.qml" line="56"/>
<location filename="qml/page/T_Tour.qml" line="58"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="19"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="56"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="58"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="19"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="19"/>
<source>Save your changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="20"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="20"/>
<location filename="qml/page/T_Tour.qml" line="17"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="17"/>
<source>Other Actions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="20"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="20"/>
<location filename="qml/page/T_Tour.qml" line="17"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="17"/>
<source>Click to see other actions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="35"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="35"/>
<location filename="qml/page/T_Tour.qml" line="32"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="32"/>
<source>Begin Tour</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="49"/>
<location filename="qml/page/T_Tour.qml" line="51"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="49"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="51"/>
<location filename="qml/page/T_Tour.qml" line="46"/>
<location filename="qml/page/T_Tour.qml" line="48"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="46"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="48"/>
<source>Upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="65"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="65"/>
<location filename="qml/page/T_Tour.qml" line="62"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="62"/>
<source>More</source>
<translation type="unfinished"></translation>
</message>

View File

@ -47,39 +47,39 @@
<name>FluentInitalizrWindow</name>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="30"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="30"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished">FluentUI脚手架</translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="51"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="51"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="59"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="59"/>
<source>Create In</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="63"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="63"/>
<source>Browse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="93"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="93"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="101"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="101"/>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
@ -102,22 +102,22 @@
<context>
<name>InitalizrHelper</name>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="73"/>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<source>The name cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<location filename="src/helper/InitalizrHelper.cpp" line="81"/>
<source>The creation path cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="82"/>
<location filename="src/helper/InitalizrHelper.cpp" line="86"/>
<source>The path does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="88"/>
<location filename="src/helper/InitalizrHelper.cpp" line="92"/>
<source>%1 folder already exists</source>
<translation type="unfinished"></translation>
</message>
@ -239,19 +239,19 @@
<location filename="qml/global/ItemsOriginal.qml" line="124"/>
<location filename="qml-Qt6/global/ItemsOriginal.qml" line="124"/>
<source>TimePicker</source>
<translation type="unfinished"></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/global/ItemsOriginal.qml" line="130"/>
<location filename="qml-Qt6/global/ItemsOriginal.qml" line="130"/>
<source>DatePicker</source>
<translation type="unfinished"></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/global/ItemsOriginal.qml" line="136"/>
<location filename="qml-Qt6/global/ItemsOriginal.qml" line="136"/>
<source>CalendarPicker</source>
<translation type="unfinished"></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/global/ItemsOriginal.qml" line="142"/>
@ -634,128 +634,126 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="24"/>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="24"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="320"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="320"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="97"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="104"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="96"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="104"/>
<source>Quit</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="98"/>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="97"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="99"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="99"/>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="98"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="101"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="101"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="101"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="101"/>
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished">FluentUI </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="106"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="106"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="350"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="105"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="349"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="117"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="117"/>
<location filename="qml/window/MainWindow.qml" line="116"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="116"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="214"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="214"/>
<location filename="qml/window/MainWindow.qml" line="213"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="213"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="224"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="224"/>
<location filename="qml/window/MainWindow.qml" line="223"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="223"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="315"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="315"/>
<location filename="qml/window/MainWindow.qml" line="314"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="314"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="316"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="316"/>
<location filename="qml/window/MainWindow.qml" line="315"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="315"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="317"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="317"/>
<location filename="qml/window/MainWindow.qml" line="316"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="316"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="320"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="320"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="322"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="322"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<location filename="qml/window/MainWindow.qml" line="346"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="346"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished">FluentUI </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source> -- The current app version</source>
<translation type="unfinished"> -- </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="347"/>
<source>
Now go and download the new version
@ -768,20 +766,20 @@ Updated content:
</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="351"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="351"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="350"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="378"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="378"/>
<location filename="qml/window/MainWindow.qml" line="377"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="377"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="385"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="385"/>
<location filename="qml/window/MainWindow.qml" line="384"/>
<location filename="qml-Qt6/window/MainWindow.qml" line="384"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>
@ -1178,7 +1176,7 @@ Updated content:
<location filename="qml/page/T_CalendarPicker.qml" line="10"/>
<location filename="qml-Qt6/page/T_CalendarPicker.qml" line="10"/>
<source>CalendarPicker</source>
<translation type="unfinished"></translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1375,7 +1373,7 @@ Updated content:
<location filename="qml/page/T_DatePicker.qml" line="10"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="10"/>
<source>TimePicker</source>
<translation type="unfinished"></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="23"/>
@ -1384,48 +1382,33 @@ Updated content:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="27"/>
<location filename="qml/page/T_DatePicker.qml" line="61"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="27"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="61"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="56"/>
<source>Year</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="28"/>
<location filename="qml/page/T_DatePicker.qml" line="62"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="28"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="62"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="57"/>
<source>Month</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="29"/>
<location filename="qml/page/T_DatePicker.qml" line="63"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="29"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="63"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="58"/>
<source>Day</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="30"/>
<location filename="qml/page/T_DatePicker.qml" line="64"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="30"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="64"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="59"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="31"/>
<location filename="qml/page/T_DatePicker.qml" line="65"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="31"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="65"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="60"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_DatePicker.qml" line="57"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="57"/>
<location filename="qml/page/T_DatePicker.qml" line="52"/>
<location filename="qml-Qt6/page/T_DatePicker.qml" line="52"/>
<source>showYear=false</source>
<translation type="unfinished"></translation>
</message>
@ -1623,26 +1606,26 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Home</name>
<message>
<location filename="qml/page/T_Home.qml" line="17"/>
<location filename="qml-Qt6/page/T_Home.qml" line="17"/>
<location filename="qml/page/T_Home.qml" line="22"/>
<location filename="qml-Qt6/page/T_Home.qml" line="23"/>
<source>FluentUI GitHub</source>
<translation type="unfinished">FluentUI GitHub</translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="18"/>
<location filename="qml-Qt6/page/T_Home.qml" line="18"/>
<location filename="qml/page/T_Home.qml" line="23"/>
<location filename="qml-Qt6/page/T_Home.qml" line="24"/>
<source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished">最新的 FluentUI 控件和样式</translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="26"/>
<location filename="qml-Qt6/page/T_Home.qml" line="26"/>
<location filename="qml/page/T_Home.qml" line="31"/>
<location filename="qml-Qt6/page/T_Home.qml" line="32"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished">FluentUI脚手架</translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="27"/>
<location filename="qml-Qt6/page/T_Home.qml" line="27"/>
<location filename="qml/page/T_Home.qml" line="32"/>
<location filename="qml-Qt6/page/T_Home.qml" line="33"/>
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
<translation type="unfinished">FluentUI 脚手架是一个快速创建项目工具,可帮助您创建和自定义具有各种选项的 Fluent UI 项目</translation>
</message>
@ -1656,14 +1639,12 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished">图像</translation>
</message>
<message>
<location filename="qml/page/T_Image.qml" line="27"/>
<location filename="qml-Qt6/page/T_Image.qml" line="27"/>
<source>Reload</source>
<translation type="unfinished">重新加载</translation>
<translation type="obsolete">重新加载</translation>
</message>
<message>
<location filename="qml/page/T_Image.qml" line="30"/>
<location filename="qml-Qt6/page/T_Image.qml" line="30"/>
<location filename="qml/page/T_Image.qml" line="29"/>
<location filename="qml-Qt6/page/T_Image.qml" line="29"/>
<source>The image failed to load, please reload</source>
<translation type="unfinished">图片加载失败,请重新加载</translation>
</message>
@ -1684,7 +1665,9 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
</message>
<message>
<location filename="qml/page/T_InfoBar.qml" line="26"/>
<location filename="qml/page/T_InfoBar.qml" line="50"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="26"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="50"/>
<source>This is an InfoBar in the Info Style</source>
<translation type="unfinished">这是一个Info样式的信息栏</translation>
</message>
@ -1719,10 +1702,14 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished">需要手动关闭的信息栏</translation>
</message>
<message>
<location filename="qml/page/T_InfoBar.qml" line="56"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="56"/>
<location filename="qml/page/T_InfoBar.qml" line="50"/>
<location filename="qml-Qt6/page/T_InfoBar.qml" line="50"/>
<source>Manual shutdown is supported</source>
<translation type="unfinished">支持手动关闭</translation>
</message>
<message>
<source>Loading...</source>
<translation type="unfinished">加载中...</translation>
<translation type="obsolete">加载中...</translation>
</message>
</context>
<context>
@ -1958,24 +1945,12 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished">分页</translation>
</message>
<message>
<location filename="qml/page/T_Pagination.qml" line="24"/>
<location filename="qml/page/T_Pagination.qml" line="31"/>
<location filename="qml/page/T_Pagination.qml" line="38"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="24"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="31"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="38"/>
<source>&lt;Previous</source>
<translation type="unfinished">&lt;上一页</translation>
<translation type="obsolete">&lt;上一页</translation>
</message>
<message>
<location filename="qml/page/T_Pagination.qml" line="25"/>
<location filename="qml/page/T_Pagination.qml" line="32"/>
<location filename="qml/page/T_Pagination.qml" line="39"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="25"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="32"/>
<location filename="qml-Qt6/page/T_Pagination.qml" line="39"/>
<source>Next&gt;</source>
<translation type="unfinished">下一页&gt;</translation>
<translation type="obsolete">下一页&gt;</translation>
</message>
</context>
<context>
@ -2282,34 +2257,24 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<translation type="unfinished">快捷键选择器</translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="19"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="19"/>
<source>Activate the Shortcut</source>
<translation type="unfinished">激活快捷键</translation>
<translation type="obsolete">激活快捷键</translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="20"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="20"/>
<source>Press the key combination to change the shortcut</source>
<translation type="unfinished">按下组合键以更改此快捷键</translation>
<translation type="obsolete">按下组合键以更改此快捷键</translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="21"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="21"/>
<source>Save</source>
<translation type="unfinished">保存</translation>
<translation type="obsolete">保存</translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="22"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="22"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
<translation type="obsolete">取消</translation>
</message>
<message>
<location filename="qml/page/T_ShortcutPicker.qml" line="23"/>
<location filename="qml-Qt6/page/T_ShortcutPicker.qml" line="23"/>
<source>Reset</source>
<translation type="unfinished">重置</translation>
<translation type="obsolete">重置</translation>
</message>
</context>
<context>
@ -2619,7 +2584,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<location filename="qml/page/T_TimePicker.qml" line="10"/>
<location filename="qml-Qt6/page/T_TimePicker.qml" line="10"/>
<source>TimePicker</source>
<translation type="unfinished">时间选器</translation>
<translation type="unfinished">时间选器</translation>
</message>
<message>
<location filename="qml/page/T_TimePicker.qml" line="26"/>
@ -2780,80 +2745,74 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Tour</name>
<message>
<location filename="qml/page/T_Tour.qml" line="14"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="14"/>
<source>Finish</source>
<translation type="unfinished">完成</translation>
<translation type="obsolete">完成</translation>
</message>
<message>
<source>Next</source>
<translation type="obsolete">下一步</translation>
</message>
<message>
<source>Previous</source>
<translation type="obsolete">上一步</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="15"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="15"/>
<source>Next</source>
<translation type="unfinished">下一步</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="16"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="16"/>
<source>Previous</source>
<translation type="unfinished">上一步</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="18"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="18"/>
<source>Upload File</source>
<translation type="unfinished">上传文件</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="18"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="18"/>
<location filename="qml/page/T_Tour.qml" line="15"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="15"/>
<source>Put your files here.</source>
<translation type="unfinished">把你的文件放在这里</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="19"/>
<location filename="qml/page/T_Tour.qml" line="56"/>
<location filename="qml/page/T_Tour.qml" line="58"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="19"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="56"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="58"/>
<location filename="qml/page/T_Tour.qml" line="16"/>
<location filename="qml/page/T_Tour.qml" line="53"/>
<location filename="qml/page/T_Tour.qml" line="55"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="16"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="53"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="55"/>
<source>Save</source>
<translation type="unfinished">保存</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="19"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="19"/>
<location filename="qml/page/T_Tour.qml" line="16"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="16"/>
<source>Save your changes.</source>
<translation type="unfinished">保存更改</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="20"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="20"/>
<location filename="qml/page/T_Tour.qml" line="17"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="17"/>
<source>Other Actions</source>
<translation type="unfinished">其他操作</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="20"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="20"/>
<location filename="qml/page/T_Tour.qml" line="17"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="17"/>
<source>Click to see other actions.</source>
<translation type="unfinished">点击查看其他操作</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="35"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="35"/>
<location filename="qml/page/T_Tour.qml" line="32"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="32"/>
<source>Begin Tour</source>
<translation type="unfinished">开始游览</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="49"/>
<location filename="qml/page/T_Tour.qml" line="51"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="49"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="51"/>
<location filename="qml/page/T_Tour.qml" line="46"/>
<location filename="qml/page/T_Tour.qml" line="48"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="46"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="48"/>
<source>Upload</source>
<translation type="unfinished">上传</translation>
</message>
<message>
<location filename="qml/page/T_Tour.qml" line="65"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="65"/>
<location filename="qml/page/T_Tour.qml" line="62"/>
<location filename="qml-Qt6/page/T_Tour.qml" line="62"/>
<source>More</source>
<translation type="unfinished">更多</translation>
</message>

View File

@ -33,7 +33,7 @@ Item {
FluNetwork.setInterceptor(function(param){
param.addHeader("Token","000000000000000000000")
})
FluApp.init(app)
FluApp.init(app,Qt.locale(TranslateHelper.current))
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
FluTheme.darkMode = SettingsHelper.getDarkMode()
@ -44,7 +44,6 @@ Item {
"/login":"qrc:/example/qml/window/LoginWindow.qml",
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
"/fluentInitalizr":"qrc:/example/qml/window/FluentInitalizrWindow.qml",
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",

View File

@ -9,22 +9,6 @@ FluScrollablePage{
title: qsTr("CalendarPicker")
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 350
paddings: 10
FluCalendarView{
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCalendarView{
}'
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
@ -36,7 +20,6 @@ FluScrollablePage{
left: parent.left
}
FluCalendarPicker{
current:new Date()
onAccepted:{
showSuccess(current.toLocaleString())
}

View File

@ -24,11 +24,6 @@ FluScrollablePage{
}
FluDatePicker{
current: new Date()
yearText: qsTr("Year")
monthText: qsTr("Month")
dayText: qsTr("Day")
cancelText: qsTr("Cancel")
okText: qsTr("OK")
onAccepted: {
showSuccess(current.toLocaleDateString())
}

View File

@ -4,12 +4,18 @@ import QtQuick.Window
import QtQuick.Controls
import FluentUI
import "../global"
import "../window"
FluScrollablePage{
launchMode: FluPageType.SingleTask
animDisabled: true
FluentInitalizrWindow{
id:fluent_initalizr
}
ListModel{
id: model_header
ListElement{
@ -27,11 +33,10 @@ FluScrollablePage{
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
url: "https://github.com/zhuzichu520/FluentUI"
clicked: function(model){
FluApp.navigate("/fluentInitalizr")
fluent_initalizr.showDialog()
}
}
}
Item{
Layout.fillWidth: true
Layout.preferredHeight: 320
@ -60,7 +65,6 @@ FluScrollablePage{
leftMargin: 20
}
}
Component{
id:com_grallery
Item{
@ -287,3 +291,4 @@ FluScrollablePage{
}
}

View File

@ -24,7 +24,6 @@ FluScrollablePage{
width: 384
height: 240
source: "https://gitee.com/zhu-zichu/zhu-zichu/raw/74f075efe2f8d3c3bb7ba3c2259e403450e4050b/image/banner_4.jpg"
errorButtonText: qsTr("Reload")
onStatusChanged:{
if(status === Image.Error){
showError(qsTr("The image failed to load, please reload"))

View File

@ -47,13 +47,13 @@ FluScrollablePage{
FluButton{
text: qsTr("InfoBar that needs to be turned off manually")
onClicked: {
showInfo("This is an InfoBar in the Info Style",0,"Manual shutdown is supported")
showInfo(qsTr("This is an InfoBar in the Info Style"),0,qsTr("Manual shutdown is supported"))
}
}
FluButton{
text:"Loading"
onClicked: {
showLoading(qsTr("Loading..."))
showLoading()
}
}
}

View File

@ -21,22 +21,16 @@ FluScrollablePage{
pageCurrent: 1
pageButtonCount: 5
itemCount: 5000
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
FluPagination{
pageCurrent: 2
itemCount: 5000
pageButtonCount: 7
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
FluPagination{
pageCurrent: 3
itemCount: 5000
pageButtonCount: 9
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
}

View File

@ -16,11 +16,6 @@ FluScrollablePage{
paddings: 10
FluShortcutPicker{
anchors.verticalCenter: parent.verticalCenter
title: qsTr("Activate the Shortcut")
message: qsTr("Press the key combination to change the shortcut")
positiveText: qsTr("Save")
neutralText: qsTr("Cancel")
negativeText: qsTr("Reset")
}
}
CodeExpander{

View File

@ -35,7 +35,7 @@ FluScrollablePage{
height: 42
radius: 4
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
border.color: modelData.darkest
border.color: modelData.darker
FluIcon {
anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium

View File

@ -11,9 +11,6 @@ FluScrollablePage{
FluTour{
id:tour
finishText: qsTr("Finish")
nextText: qsTr("Next")
previousText: qsTr("Previous")
steps:[
{title:qsTr("Upload File"),description: qsTr("Put your files here."),target:()=>btn_upload},
{title:qsTr("Save"),description: qsTr("Save your changes."),target:()=>btn_save},

View File

@ -5,108 +5,109 @@ import FluentUI
import Qt.labs.platform
import "../component"
FluWindow {
FluWindowDialog {
id:window
title:qsTr("FluentUI Initalizr")
width: 600
height: 400
fixSize: true
modality: Qt.ApplicationModal
launchMode: FluWindowType.SingleTask
showStayTop: false
Connections{
target: InitalizrHelper
function onError(message){
showError(message)
}
function onSuccess(path){
FluTools.showFileInFolder(path+"/CMakeLists.txt")
window.close()
}
}
FluText{
id:text_title
text:qsTr("FluentUI Initalizr")
font: FluTextStyle.Title
anchors{
left: parent.left
top: parent.top
leftMargin: 20
topMargin: 20
}
}
Column{
spacing: 14
anchors{
left: parent.left
top: text_title.bottom
leftMargin: 20
topMargin: 20
}
FluTextBox{
id:text_box_name
width: 180
placeholderText: qsTr("Name")
focus: true
}
Row{
spacing: 8
FluTextBox{
id:text_box_path
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
}
FluButton{
text:qsTr("Browse")
anchors.verticalCenter: parent.verticalCenter
onClicked: {
folder_dialog.open()
contentDelegate:Component{
Item{
Connections{
target: InitalizrHelper
function onError(message){
showError(message)
}
}
}
}
FolderDialog{
id:folder_dialog
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}
}
Rectangle{
id:layout_actions
width: parent.width
height: 60
anchors.bottom: parent.bottom
color: FluTheme.backgroundColor
Row{
height: parent.height
spacing: 20
anchors{
right: parent.right
rightMargin: 20
}
FluButton{
text:qsTr("Cancel")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
function onSuccess(path){
FluTools.showFileInFolder(path+"/CMakeLists.txt")
window.close()
}
}
FluFilledButton{
text:qsTr("Create")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
FluText{
id:text_title
text:qsTr("FluentUI Initalizr")
font: FluTextStyle.Title
anchors{
left: parent.left
top: parent.top
leftMargin: 20
topMargin: 20
}
}
Column{
spacing: 14
anchors{
left: parent.left
top: text_title.bottom
leftMargin: 20
topMargin: 20
}
FluTextBox{
id:text_box_name
width: 180
placeholderText: qsTr("Name")
focus: true
}
Row{
spacing: 8
FluTextBox{
id:text_box_path
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
}
FluButton{
text:qsTr("Browse")
anchors.verticalCenter: parent.verticalCenter
onClicked: {
folder_dialog.open()
}
}
}
}
FolderDialog{
id:folder_dialog
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}
}
Rectangle{
id:layout_actions
width: parent.width
height: 60
anchors.bottom: parent.bottom
color: FluTheme.backgroundColor
Row{
height: parent.height
spacing: 20
anchors{
right: parent.right
rightMargin: 20
}
FluButton{
text:qsTr("Cancel")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
window.close()
}
}
FluFilledButton{
text:qsTr("Create")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
}
}
}
}
}
}
}

View File

@ -21,7 +21,6 @@ FluWindow {
fitsAppBarWindows: true
appBar: FluAppBar {
height: 30
darkText: qsTr("Dark Mode")
showDark: true
darkClickListener:(button)=>handleDarkChanged(button)
closeClickListener: ()=>{dialog_close.open()}

View File

@ -33,7 +33,7 @@ Item {
FluNetwork.setInterceptor(function(param){
param.addHeader("Token","000000000000000000000")
})
FluApp.init(app)
FluApp.init(app,Qt.locale(TranslateHelper.current))
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
FluTheme.darkMode = SettingsHelper.getDarkMode()
@ -44,7 +44,6 @@ Item {
"/login":"qrc:/example/qml/window/LoginWindow.qml",
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
"/crash":"qrc:/example/qml/window/CrashWindow.qml",
"/fluentInitalizr":"qrc:/example/qml/window/FluentInitalizrWindow.qml",
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",

View File

@ -9,22 +9,6 @@ FluScrollablePage{
title: qsTr("CalendarPicker")
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 350
paddings: 10
FluCalendarView{
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluCalendarView{
}'
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
@ -36,7 +20,6 @@ FluScrollablePage{
left: parent.left
}
FluCalendarPicker{
current:new Date()
onAccepted:{
showSuccess(current.toLocaleString())
}

View File

@ -24,11 +24,6 @@ FluScrollablePage{
}
FluDatePicker{
current: new Date()
yearText: qsTr("Year")
monthText: qsTr("Month")
dayText: qsTr("Day")
cancelText: qsTr("Cancel")
okText: qsTr("OK")
onAccepted: {
showSuccess(current.toLocaleDateString())
}
@ -58,11 +53,6 @@ FluScrollablePage{
}
FluDatePicker{
showYear: false
yearText: qsTr("Year")
monthText: qsTr("Month")
dayText: qsTr("Day")
cancelText: qsTr("Cancel")
okText: qsTr("OK")
onAccepted: {
showSuccess(current.toLocaleDateString())
}

View File

@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import FluentUI 1.0
import "../window"
import "../global"
FluScrollablePage{
@ -10,6 +11,10 @@ FluScrollablePage{
launchMode: FluPageType.SingleTask
animDisabled: true
FluentInitalizrWindow{
id:fluent_initalizr
}
ListModel{
id: model_header
ListElement{
@ -27,11 +32,10 @@ FluScrollablePage{
desc: qsTr("FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.")
url: "https://github.com/zhuzichu520/FluentUI"
clicked: function(model){
FluApp.navigate("/fluentInitalizr")
fluent_initalizr.showDialog()
}
}
}
Item{
Layout.fillWidth: true
Layout.preferredHeight: 320
@ -60,7 +64,6 @@ FluScrollablePage{
leftMargin: 20
}
}
Component{
id:com_grallery
Item{

View File

@ -24,7 +24,6 @@ FluScrollablePage{
width: 384
height: 240
source: "https://gitee.com/zhu-zichu/zhu-zichu/raw/74f075efe2f8d3c3bb7ba3c2259e403450e4050b/image/banner_4.jpg"
errorButtonText: qsTr("Reload")
onStatusChanged:{
if(status === Image.Error){
showError(qsTr("The image failed to load, please reload"))

View File

@ -47,13 +47,13 @@ FluScrollablePage{
FluButton{
text: qsTr("InfoBar that needs to be turned off manually")
onClicked: {
showInfo("This is an InfoBar in the Info Style",0,"Manual shutdown is supported")
showInfo(qsTr("This is an InfoBar in the Info Style"),0,qsTr("Manual shutdown is supported"))
}
}
FluButton{
text:"Loading"
onClicked: {
showLoading(qsTr("Loading..."))
showLoading()
}
}
}

View File

@ -21,22 +21,16 @@ FluScrollablePage{
pageCurrent: 1
pageButtonCount: 5
itemCount: 5000
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
FluPagination{
pageCurrent: 2
itemCount: 5000
pageButtonCount: 7
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
FluPagination{
pageCurrent: 3
itemCount: 5000
pageButtonCount: 9
previousText: qsTr("<Previous")
nextText: qsTr("Next>")
}
}

View File

@ -16,11 +16,6 @@ FluScrollablePage{
paddings: 10
FluShortcutPicker{
anchors.verticalCenter: parent.verticalCenter
title: qsTr("Activate the Shortcut")
message: qsTr("Press the key combination to change the shortcut")
positiveText: qsTr("Save")
neutralText: qsTr("Cancel")
negativeText: qsTr("Reset")
}
}
CodeExpander{

View File

@ -35,7 +35,7 @@ FluScrollablePage{
height: 42
radius: 4
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
border.color: modelData.darkest
border.color: modelData.darker
FluIcon {
anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium

View File

@ -11,9 +11,6 @@ FluScrollablePage{
FluTour{
id:tour
finishText: qsTr("Finish")
nextText: qsTr("Next")
previousText: qsTr("Previous")
steps:[
{title:qsTr("Upload File"),description: qsTr("Put your files here."),target:()=>btn_upload},
{title:qsTr("Save"),description: qsTr("Save your changes."),target:()=>btn_save},

View File

@ -5,108 +5,109 @@ import FluentUI 1.0
import Qt.labs.platform 1.1
import "../component"
FluWindow {
FluWindowDialog {
id:window
title:qsTr("FluentUI Initalizr")
width: 600
height: 400
fixSize: true
modality: Qt.ApplicationModal
launchMode: FluWindowType.SingleTask
showStayTop: false
Connections{
target: InitalizrHelper
function onError(message){
showError(message)
}
function onSuccess(path){
FluTools.showFileInFolder(path+"/CMakeLists.txt")
window.close()
}
}
FluText{
id:text_title
text:qsTr("FluentUI Initalizr")
font: FluTextStyle.Title
anchors{
left: parent.left
top: parent.top
leftMargin: 20
topMargin: 20
}
}
Column{
spacing: 14
anchors{
left: parent.left
top: text_title.bottom
leftMargin: 20
topMargin: 20
}
FluTextBox{
id:text_box_name
width: 180
placeholderText: qsTr("Name")
focus: true
}
Row{
spacing: 8
FluTextBox{
id:text_box_path
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
}
FluButton{
text:qsTr("Browse")
anchors.verticalCenter: parent.verticalCenter
onClicked: {
folder_dialog.open()
contentDelegate:Component{
Item{
Connections{
target: InitalizrHelper
function onError(message){
showError(message)
}
}
}
}
FolderDialog{
id:folder_dialog
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}
}
Rectangle{
id:layout_actions
width: parent.width
height: 60
anchors.bottom: parent.bottom
color: FluTheme.backgroundColor
Row{
height: parent.height
spacing: 20
anchors{
right: parent.right
rightMargin: 20
}
FluButton{
text:qsTr("Cancel")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
function onSuccess(path){
FluTools.showFileInFolder(path+"/CMakeLists.txt")
window.close()
}
}
FluFilledButton{
text:qsTr("Create")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
FluText{
id:text_title
text:qsTr("FluentUI Initalizr")
font: FluTextStyle.Title
anchors{
left: parent.left
top: parent.top
leftMargin: 20
topMargin: 20
}
}
Column{
spacing: 14
anchors{
left: parent.left
top: text_title.bottom
leftMargin: 20
topMargin: 20
}
FluTextBox{
id:text_box_name
width: 180
placeholderText: qsTr("Name")
focus: true
}
Row{
spacing: 8
FluTextBox{
id:text_box_path
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
}
FluButton{
text:qsTr("Browse")
anchors.verticalCenter: parent.verticalCenter
onClicked: {
folder_dialog.open()
}
}
}
}
FolderDialog{
id:folder_dialog
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}
}
Rectangle{
id:layout_actions
width: parent.width
height: 60
anchors.bottom: parent.bottom
color: FluTheme.backgroundColor
Row{
height: parent.height
spacing: 20
anchors{
right: parent.right
rightMargin: 20
}
FluButton{
text:qsTr("Cancel")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
window.close()
}
}
FluFilledButton{
text:qsTr("Create")
width: 120
anchors.verticalCenter: parent.verticalCenter
onClicked: {
InitalizrHelper.generate(text_box_name.text,text_box_path.text)
}
}
}
}
}
}
}

View File

@ -21,7 +21,6 @@ FluWindow {
fitsAppBarWindows: true
appBar: FluAppBar {
height: 30
darkText: qsTr("Dark Mode")
showDark: true
darkClickListener:(button)=>handleDarkChanged(button)
closeClickListener: ()=>{dialog_close.open()}

View File

@ -1,90 +1,9 @@
cmake_minimum_required(VERSION 3.20)
project(%1 VERSION 0.1 LANGUAGES CXX)
project(%1 VERSION 1.0)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(APPLICATION_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
else()
set(APPLICATION_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/release)
endif()
if(APPLE)
set(APPLICATION_REAL_PATH ${APPLICATION_OUTPUT_DIRECTORY}/${PROJECT_NAME}.app/Contents/MacOS)
else()
set(APPLICATION_REAL_PATH ${APPLICATION_OUTPUT_DIRECTORY})
endif()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick)
find_program(QT_LUPDATE NAMES lupdate)
find_program(QT_LRELEASE NAMES lrelease)
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_en_US.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_zh_CN.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm)
file(COPY ${QM_FILE_PATHS} DESTINATION ${APPLICATION_REAL_PATH}/i18n)
set(PROJECT_SOURCES
main.cpp
qml.qrc
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(${PROJECT_NAME}
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
else()
add_executable(${PROJECT_NAME}
${PROJECT_SOURCES}
)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${APPLICATION_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${APPLICATION_OUTPUT_DIRECTORY}"
)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Quick
fluentuiplugin
)
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.${PROJECT_NAME})
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
add_subdirectory(FluentUI)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(QT_VERSION_MAJOR EQUAL 6)
qt_import_qml_plugins(${PROJECT_NAME})
qt_finalize_executable(${PROJECT_NAME})
endif()
add_subdirectory(src)

View File

@ -0,0 +1,88 @@
cmake_minimum_required(VERSION 3.20)
project(%1 VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(APPLICATION_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
else()
set(APPLICATION_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/release)
endif()
if(APPLE)
set(APPLICATION_REAL_PATH ${APPLICATION_OUTPUT_DIRECTORY}/${PROJECT_NAME}.app/Contents/MacOS)
else()
set(APPLICATION_REAL_PATH ${APPLICATION_OUTPUT_DIRECTORY})
endif()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick)
find_program(QT_LUPDATE NAMES lupdate)
find_program(QT_LRELEASE NAMES lrelease)
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_en_US.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_zh_CN.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm)
file(COPY ${QM_FILE_PATHS} DESTINATION ${APPLICATION_REAL_PATH}/i18n)
set(PROJECT_SOURCES
main.cpp
qml.qrc
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(${PROJECT_NAME}
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
else()
add_executable(${PROJECT_NAME}
${PROJECT_SOURCES}
)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${APPLICATION_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${APPLICATION_OUTPUT_DIRECTORY}"
)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Quick
fluentuiplugin
)
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.${PROJECT_NAME})
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(QT_VERSION_MAJOR EQUAL 6)
qt_import_qml_plugins(${PROJECT_NAME})
qt_finalize_executable(${PROJECT_NAME})
endif()

View File

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -50,6 +50,10 @@ void InitalizrHelper::templateToFile(const QString& source,const QString& dest,A
QTextStream in(&file);
QString content = in.readAll().arg(std::forward<Args>(args)...);
file.close();
QDir outputDir = QFileInfo(dest).absoluteDir();
if(!outputDir.exists()){
outputDir.mkpath(outputDir.absolutePath());
}
QFile outputFile(dest);
if (outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream out(&outputFile);
@ -92,12 +96,13 @@ void InitalizrHelper::generate(const QString& name,const QString& path){
QDir fluentDir(projectDir.filePath("FluentUI"));
copyDir(QDir(QGuiApplication::applicationDirPath()+"/source"),fluentDir);
templateToFile(":/example/res/template/CMakeLists.txt.in",projectDir.filePath("CMakeLists.txt"),name);
templateToFile(":/example/res/template/main.cpp.in",projectDir.filePath("main.cpp"),name);
templateToFile(":/example/res/template/main.qml.in",projectDir.filePath("main.qml"),name);
templateToFile(":/example/res/template/en_US.ts.in",projectDir.filePath(name+"_en_US.ts"),name);
templateToFile(":/example/res/template/zh_CN.ts.in",projectDir.filePath(name+"_zh_CN.ts"),name);
copyFile(":/example/res/template/App.qml.in",projectDir.filePath("App.qml"));
copyFile(":/example/res/template/qml.qrc.in",projectDir.filePath("qml.qrc"));
copyFile(":/example/res/template/logo.ico.in",projectDir.filePath("logo.ico"));
templateToFile(":/example/res/template/src/CMakeLists.txt.in",projectDir.filePath("src/CMakeLists.txt"),name);
templateToFile(":/example/res/template/src/main.cpp.in",projectDir.filePath("src/main.cpp"),name);
templateToFile(":/example/res/template/src/main.qml.in",projectDir.filePath("src/main.qml"),name);
templateToFile(":/example/res/template/src/en_US.ts.in",projectDir.filePath("src/"+name+"_en_US.ts"),name);
templateToFile(":/example/res/template/src/zh_CN.ts.in",projectDir.filePath("src/"+name+"_zh_CN.ts"),name);
copyFile(":/example/res/template/src/App.qml.in",projectDir.filePath("src/App.qml"));
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"));
return this->success(projectPath);
}

View File

@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#设置版本号
add_definitions(-DFLUENTUI_VERSION=1,7,0,0)
add_definitions(-DFLUENTUI_VERSION=1,7,2,0)
if (FLUENTUI_BUILD_STATIC_LIB)
add_definitions(-DFLUENTUI_BUILD_STATIC_LIB)
@ -43,6 +43,21 @@ else()
set(CMAKE_AUTOUIC ON)
endif()
#国际化
find_program(QT_LUPDATE NAMES lupdate)
find_program(QT_LRELEASE NAMES lrelease)
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_en_US.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_en_US.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}_zh_CN.qm)
execute_process(COMMAND ${QT_LUPDATE} ${CMAKE_CURRENT_LIST_DIR} -ts ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${QT_LRELEASE} ${PROJECT_NAME}_zh_CN.ts WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
endif ()
file(GLOB QM_FILE_PATHS ${CMAKE_CURRENT_LIST_DIR}/ *.qm)
file(COPY ${QM_FILE_PATHS} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/Qt${QT_VERSION_MAJOR}/imports/FluentUI/i18n")
#遍历所有Cpp文件
file(GLOB_RECURSE CPP_FILES *.cpp *.h)
foreach(filepath ${CPP_FILES})
@ -67,7 +82,7 @@ if(QT_VERSION VERSION_GREATER_EQUAL "6.2")
endforeach(filepath)
#遍历所有资源文件
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.js)
file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.js *.qm)
foreach(filepath ${RES_PATHS})
if(${filepath} MATCHES "Qt${QT_VERSION_MAJOR}/")
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath})

View File

@ -8,6 +8,7 @@
#include <QUuid>
#include <QFontDatabase>
#include <QClipboard>
#include <QTranslator>
FluApp::FluApp(QObject *parent):QObject{parent}{
useSystemAppBar(false);
@ -16,8 +17,19 @@ FluApp::FluApp(QObject *parent):QObject{parent}{
FluApp::~FluApp(){
}
void FluApp::init(QObject *target){
void FluApp::init(QObject *target,QLocale locale){
_locale = locale;
_engine = qmlEngine(target);
_translator = new QTranslator(this);
qApp->installTranslator(_translator);
const QStringList uiLanguages = _locale.uiLanguages();
for (const QString &name : uiLanguages) {
const QString baseName = "fluentuiplugin_" + QLocale(name).name();
if (_translator->load(":/qt/qml/FluentUI/i18n/"+ baseName)) {
_engine->retranslate();
break;
}
}
}
void FluApp::run(){

View File

@ -8,6 +8,7 @@
#include <QQmlContext>
#include <QJsonObject>
#include <QQmlEngine>
#include <QTranslator>
#include "FluWindowRegister.h"
#include "stdafx.h"
#include "singleton.h"
@ -22,6 +23,7 @@ class FluApp : public QObject
Q_PROPERTY_AUTO(QJsonObject,routes);
Q_PROPERTY_AUTO(bool,useSystemAppBar);
Q_PROPERTY_AUTO(QString,windowIcon);
Q_PROPERTY_AUTO(QLocale,locale);
QML_NAMED_ELEMENT(FluApp)
QML_SINGLETON
private:
@ -32,7 +34,7 @@ public:
static FluApp *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return getInstance();}
Q_INVOKABLE void run();
Q_INVOKABLE void navigate(const QString& route,const QJsonObject& argument = {},FluWindowRegister* windowRegister = nullptr);
Q_INVOKABLE void init(QObject *target);
Q_INVOKABLE void init(QObject *target,QLocale locale = QLocale::system());
Q_INVOKABLE void exit(int retCode = 0);
Q_INVOKABLE QVariant createWindowRegister(QQuickWindow* window,const QString& path);
void addWindow(QQuickWindow* window);
@ -40,6 +42,7 @@ public:
private:
QMap<quint64, QQuickWindow*> _windows;
QQmlEngine *_engine;
QTranslator* _translator = nullptr;
};
#endif // FLUAPP_H

View File

@ -34,6 +34,26 @@ static inline bool isCompositionEnabled(){
}
return false;
}
static inline void showShadow(HWND hwnd){
if(isCompositionEnabled()){
const MARGINS shadow = { 0, 0, 1, 0 };
typedef HRESULT (WINAPI* DwmExtendFrameIntoClientAreaPtr)(HWND hWnd, const MARGINS *pMarInset);
HMODULE module = LoadLibraryW(L"dwmapi.dll");
if (module)
{
DwmExtendFrameIntoClientAreaPtr dwm_extendframe_into_client_area_;
dwm_extendframe_into_client_area_= reinterpret_cast<DwmExtendFrameIntoClientAreaPtr>(GetProcAddress(module, "DwmExtendFrameIntoClientArea"));
if (dwm_extendframe_into_client_area_)
{
dwm_extendframe_into_client_area_(hwnd, &shadow);
}
}
}else{
ULONG_PTR cNewStyle = GetClassLongPtr(hwnd, GCL_STYLE) | CS_DROPSHADOW;
SetClassLongPtr(hwnd, GCL_STYLE, cNewStyle);
}
}
#endif
FramelessEventFilter::FramelessEventFilter(FluFramelessHelper* helper){
@ -167,10 +187,21 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
return true;
}else if(uMsg == WM_GETMINMAXINFO){
MINMAXINFO* 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;
#else
auto pixelRatio = _helper->window->devicePixelRatio();
auto geometry = _helper->window->screen()->availableGeometry();
RECT rect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x();
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
minmaxInfo->ptMaxSize.x = geometry.width()*pixelRatio + offsetXY.x() * 2;
minmaxInfo->ptMaxSize.y = geometry.height()*pixelRatio + offsetXY.y() * 2;
#endif
return false;
}else if(uMsg == WM_NCRBUTTONDOWN){
if (wParam == HTCAPTION) {
@ -183,6 +214,14 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
auto pos = _helper->window->position();
_helper->showSystemMenu(QPoint(pos.x(),pos.y()+_helper->getAppBarHeight()));
}
}else if(uMsg == WM_SYSCOMMAND){
if(wParam == SC_MINIMIZE){
if(_helper->window->transientParent()){
_helper->window->transientParent()->showMinimized();
}
return true;
}
return false;
}
return false;
#endif
@ -303,6 +342,11 @@ void FluFramelessHelper::componentComplete(){
_appBar.value<QObject*>()->setProperty("systemMoveEnable",false);
}
window->setFlags((window->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint);
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
if(FluTools::getInstance()->isSoftware()){
window->setFlag(Qt::FramelessWindowHint,false);
}
#endif
if(resizeable()){
window->setFlag(Qt::WindowMaximizeButtonHint);
}

View File

@ -37,9 +37,9 @@ void FluTheme::refreshColors(){
fontSecondaryColor(isDark ? QColor(222,222,222,255) : QColor(102,102,102,255));
fontTertiaryColor(isDark ? QColor(200,200,200,255) : QColor(153,153,153,255));
itemNormalColor(isDark ? QColor(255,255,255,0) : QColor(0,0,0,0));
itemHoverColor(isDark ? QColor(255,255,255,255*0.03) : QColor(0,0,0,255*0.03));
itemPressColor(isDark ? QColor(255,255,255,255*0.06) : QColor(0,0,0,255*0.06));
itemCheckColor(isDark ? QColor(255,255,255,255*0.09) : QColor(0,0,0,255*0.09));
itemHoverColor(isDark ? QColor(255,255,255,255*0.06) : QColor(0,0,0,255*0.03));
itemPressColor(isDark ? QColor(255,255,255,255*0.09) : QColor(0,0,0,255*0.06));
itemCheckColor(isDark ? QColor(255,255,255,255*0.12) : QColor(0,0,0,255*0.09));
}
bool FluTheme::eventFilter(QObject *obj, QEvent *event){

View File

@ -241,6 +241,6 @@ bool FluTools::isWindows10OrGreater(){
}
}
int FluTools::getTaskBarHeight(QQuickWindow* window){
return window->screen()->geometry().height() - window->screen()->availableGeometry().height();
QRect FluTools::desktopAvailableGeometry(QQuickWindow* window){
return window->screen()->availableGeometry();
}

View File

@ -55,7 +55,7 @@ public:
Q_INVOKABLE int windowBuildNumber();
Q_INVOKABLE bool isWindows11OrGreater();
Q_INVOKABLE bool isWindows10OrGreater();
Q_INVOKABLE int getTaskBarHeight(QQuickWindow* window);
Q_INVOKABLE QRect desktopAvailableGeometry(QQuickWindow* window);
};
#endif // FLUTOOLS_H

View File

@ -7,18 +7,21 @@ FluWindowLifecycle::FluWindowLifecycle(QObject *parent):QObject{parent}{
}
void FluWindowLifecycle::onCompleted(QQuickWindow* window){
this->_window = window;
FluApp::getInstance()->addWindow(this->_window);
_window = window;
if(_window && _window->transientParent() == nullptr){
FluApp::getInstance()->addWindow(_window);
}
}
void FluWindowLifecycle::onDestoryOnClose(){
if(_window){
FluApp::getInstance()->removeWindow(this->_window);
if(_window && _window->transientParent() == nullptr){
FluApp::getInstance()->removeWindow(_window);
_window = nullptr;
}
}
void FluWindowLifecycle::onDestruction(){
}
void FluWindowLifecycle::onVisible(bool visible){

View File

@ -49,7 +49,6 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluBreadcrumbBar.qml"),uri,major,minor,"FluBreadcrumbBar");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluButton.qml"),uri,major,minor,"FluButton");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCalendarPicker.qml"),uri,major,minor,"FluCalendarPicker");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCalendarView.qml"),uri,major,minor,"FluCalendarView");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCarousel.qml"),uri,major,minor,"FluCarousel");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluChart.qml"),uri,major,minor,"FluChart");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluCheckBox.qml"),uri,major,minor,"FluCheckBox");
@ -69,6 +68,7 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluIcon.qml"),uri,major,minor,"FluIcon");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluIconButton.qml"),uri,major,minor,"FluIconButton");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluImage.qml"),uri,major,minor,"FluImage");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluImageButton.qml"),uri,major,minor,"FluImageButton");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluInfoBar.qml"),uri,major,minor,"FluInfoBar");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluItemDelegate.qml"),uri,major,minor,"FluItemDelegate");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluMenu.qml"),uri,major,minor,"FluMenu");
@ -119,6 +119,7 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTour.qml"),uri,major,minor,"FluTour");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTreeView.qml"),uri,major,minor,"FluTreeView");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluWindow.qml"),uri,major,minor,"FluWindow");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluWindowDialog.qml"),uri,major,minor,"FluWindowDialog");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRangeSlider.qml"),uri,major,minor,"FluRangeSlider");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluStaggeredLayout.qml"),uri,major,minor,"FluStaggeredLayout");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluProgressButton.qml"),uri,major,minor,"FluProgressButton");

View File

@ -6,13 +6,14 @@ import FluentUI 1.0
Rectangle{
property string title: ""
property string darkText : "夜间模式"
property string minimizeText : "最小化"
property string restoreText : "向下还原"
property string maximizeText : "最大化"
property string closeText : "关闭"
property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶"
property string darkText : qsTr("Dark")
property string lightText : qsTr("Light")
property string minimizeText : qsTr("Minimize")
property string restoreText : qsTr("Restore")
property string maximizeText : qsTr("Maximize")
property string closeText : qsTr("Close")
property string stayTopText : qsTr("Sticky on Top")
property string stayTopCancelText : qsTr("Sticky on Top cancelled")
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor
@ -49,7 +50,11 @@ Rectangle{
}
}
property var minClickListener: function(){
d.win.showMinimized()
if(d.win.transientParent != null){
d.win.transientParent.showMinimized()
}else{
d.win.showMinimized()
}
}
property var closeClickListener : function(){
d.win.close()
@ -199,24 +204,33 @@ Rectangle{
Component.onCompleted: {
setHitTestVisible(layout_row)
}
FluToggleSwitch{
FluIconButton{
id:btn_dark
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
rightPadding: 2
iconSource: FluTheme.dark ? FluentIcons.Brightness : FluentIcons.QuietHours
Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: 5
iconSize: 15
visible: showDark
text:darkText
textColor:control.textColor
checked: FluTheme.dark
textRight: false
clickListener:()=> darkClickListener(btn_dark)
text: FluTheme.dark ? control.lightText : control.darkText
radius: 0
iconColor:control.textColor
onClicked:()=> darkClickListener(btn_dark)
}
FluIconButton{
id:btn_stay_top
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.Pinned
Layout.alignment: Qt.AlignVCenter
iconSize: 13
iconSize: 14
visible: {
if(!(d.win instanceof FluWindow)){
return false
@ -232,6 +246,9 @@ Rectangle{
id:btn_minimize
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.ChromeMinimize
Layout.alignment: Qt.AlignVCenter
iconSize: 11
@ -251,6 +268,9 @@ Rectangle{
id:btn_maximize
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : d.isRestore ? FluentIcons.ChromeRestore : FluentIcons.ChromeMaximize
color: {
if(down){
@ -271,11 +291,14 @@ Rectangle{
}
FluIconButton{
id:btn_close
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.ChromeClose
Layout.alignment: Qt.AlignVCenter
text:closeText
Layout.preferredWidth: 40
Layout.preferredHeight: 30
visible: !isMac && showClose
radius: 0
iconSize: 10

View File

@ -5,18 +5,46 @@ import FluentUI 1.0
FluTextBox{
property var items:[]
property string emptyText: "没有找到结果"
property string emptyText: qsTr("No results found")
property int autoSuggestBoxReplacement: FluentIcons.Search
property var filter: function(item){
if(item.title.indexOf(control.text)!==-1){
return true
}
return false
}
signal itemClicked(var data)
signal handleClicked
id:control
Component.onCompleted: {
loadData()
d.loadData()
}
Item{
id:d
property bool flagVisible: true
property var window : Window.window
function handleClick(modelData){
control_popup.visible = false
control.itemClicked(modelData)
d.updateText(modelData.title)
}
function updateText(text){
d.flagVisible = false
control.text = text
d.flagVisible = true
}
function loadData(){
var result = []
if(items==null){
list_view.model = result
return
}
items.map(function(item){
if(control.filter(item)){
result.push(item)
}
})
list_view.model = result
}
}
onActiveFocusChanged: {
if(!activeFocus){
@ -66,7 +94,7 @@ FluTextBox{
height: 38
width: control.width
onClicked:{
handleClick(modelData)
d.handleClick(modelData)
}
background: Rectangle{
FluFocusRectangle{
@ -96,40 +124,17 @@ FluTextBox{
}
}
onTextChanged: {
loadData()
d.loadData()
if(d.flagVisible){
var pos = control.mapToItem(null, 0, 0)
if(window.height>pos.y+control.height+container.implicitHeight){
if(d.window.height>pos.y+control.height+container.implicitHeight){
control_popup.y = control.height
} else if(pos.y>container.implicitHeight){
control_popup.y = -container.implicitHeight
} else {
control_popup.y = window.height-(pos.y+container.implicitHeight)
control_popup.y = d.window.height-(pos.y+container.implicitHeight)
}
control_popup.visible = true
}
}
function handleClick(modelData){
control_popup.visible = false
control.itemClicked(modelData)
updateText(modelData.title)
}
function updateText(text){
d.flagVisible = false
control.text = text
d.flagVisible = true
}
function loadData(){
var result = []
if(items==null){
list_view.model = result
return
}
items.map(function(item){
if(item.title.indexOf(control.text)!==-1){
result.push(item)
}
})
list_view.model = result
}
}

View File

@ -3,12 +3,15 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import FluentUI 1.0
import Qt.labs.calendar 1.0
Rectangle {
property color dividerColor: FluTheme.dark ? Qt.rgba(77/255,77/255,77/255,1) : Qt.rgba(239/255,239/255,239/255,1)
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(251/255,251/255,251/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
property string text: "请选择日期"
property string text: qsTr("Pick a date")
property date from: new Date(1924, 0, 1)
property date to: new Date(2124, 11, 31)
property var current
signal accepted()
id:control
@ -23,15 +26,6 @@ Rectangle {
radius: 4
border.width: 1
border.color: dividerColor
Component.onCompleted: {
if(current){
const date = current
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
text_date.text = year+"-"+(month+1)+"-"+day
}
}
MouseArea{
id:mouse_area
hoverEnabled: true
@ -40,9 +34,25 @@ Rectangle {
popup.showPopup()
}
}
CalendarModel {
id:calender_model
from: control.from
to: control.to
}
Item{
id:d
property var window : Window.window
property date displayDate: {
if(control.current){
return control.current
}
return new Date()
}
property date toDay : new Date()
property int pageIndex: 0
signal nextButton
signal previousButton
property point yearRing : Qt.point(0,0)
}
FluText{
id:text_date
@ -55,7 +65,12 @@ Rectangle {
}
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text:control.text
text:{
if(control.current){
return control.current.toLocaleDateString(FluApp.locale,"yyyy/M/d")
}
return control.text
}
}
FluIcon{
iconSource: FluentIcons.Calendar
@ -92,18 +107,538 @@ Rectangle {
}
contentItem: Item{
clip: true
FluCalendarView{
FluArea{
id:container
onDateClicked:
(date)=>{
popup.close()
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
text_date.text = year+"-"+(month+1)+"-"+day
current= date
control.accepted()
width: 300
height: 360
ColumnLayout {
anchors.fill: parent
spacing: 0
Item{
Layout.fillWidth: true
Layout.preferredHeight: 50
RowLayout{
anchors.fill: parent
spacing: 10
Item{
Layout.leftMargin: parent.spacing
Layout.fillWidth: true
Layout.fillHeight: true
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: d.displayDate.toLocaleString(FluApp.locale, "MMMM yyyy")
verticalAlignment: Text.AlignVCenter
}
visible: d.pageIndex === 0
onClicked: {
d.pageIndex = 1
}
}
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: d.displayDate.toLocaleString(FluApp.locale, "yyyy")
verticalAlignment: Text.AlignVCenter
}
visible: d.pageIndex === 1
onClicked: {
d.pageIndex = 2
}
}
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: "%1-%2".arg(d.yearRing.x).arg(d.yearRing.y)
verticalAlignment: Text.AlignVCenter
textColor: FluTheme.fontTertiaryColor
}
visible: d.pageIndex === 2
}
}
FluIconButton{
id:icon_up
iconSource: FluentIcons.CaretUpSolid8
iconSize: 10
onClicked: {
d.previousButton()
}
}
FluIconButton{
id:icon_down
iconSource: FluentIcons.CaretDownSolid8
iconSize: 10
Layout.rightMargin: parent.spacing
onClicked: {
d.nextButton()
}
}
}
FluDivider{
width: parent.width
height: 1
anchors.bottom: parent.bottom
}
}
Item{
Layout.fillWidth: true
Layout.fillHeight: true
StackView{
id:stack_view
anchors.fill: parent
initialItem: com_page_one
replaceEnter : Transition{
OpacityAnimator{
from: 0
to: 1
duration: 88
}
ScaleAnimator{
from: 0.5
to: 1
duration: 167
easing.type: Easing.OutCubic
}
}
replaceExit : Transition{
OpacityAnimator{
from: 1
to: 0
duration: 88
}
ScaleAnimator{
from: 1.0
to: 0.5
duration: 167
easing.type: Easing.OutCubic
}
}
}
Connections{
target: d
function onPageIndexChanged(){
if(d.pageIndex === 0){
stack_view.replace(com_page_one)
}
if(d.pageIndex === 1){
stack_view.replace(com_page_two)
}
if(d.pageIndex === 2){
stack_view.replace(com_page_three)
}
}
}
Component{
id:com_page_three
GridView{
id:grid_view
cellHeight: 75
cellWidth: 75
clip: true
boundsBehavior: GridView.StopAtBounds
ScrollBar.vertical: FluScrollBar {}
model: {
var fromYear = calender_model.from.getFullYear()
var toYear = calender_model.to.getFullYear()
return toYear-fromYear+1
}
highlightRangeMode: GridView.StrictlyEnforceRange
onCurrentIndexChanged:{
var year = currentIndex + calender_model.from.getFullYear()
var start = Math.ceil(year / 10) * 10
var end = start+10
d.yearRing = Qt.point(start,end)
}
highlightMoveDuration: 100
Component.onCompleted: {
grid_view.highlightMoveDuration = 0
currentIndex = d.displayDate.getFullYear()-calender_model.from.getFullYear()
timer_delay.restart()
}
Connections{
target: d
function onNextButton(){
grid_view.currentIndex = Math.min(grid_view.currentIndex+16,grid_view.count-1)
}
function onPreviousButton(){
grid_view.currentIndex = Math.max(grid_view.currentIndex-16,0)
}
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
grid_view.highlightMoveDuration = 100
}
}
currentIndex: -1
delegate: Item{
property int year : calender_model.from.getFullYear()+modelData
property bool toYear: year === d.toDay.getFullYear()
implicitHeight: 75
implicitWidth: 75
FluControl{
id:control_delegate
width: 60
height: 60
anchors.centerIn: parent
Rectangle{
width: 48
height: 48
radius: width/2
color: {
if(toYear){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
FluText{
text: year
anchors.centerIn: parent
opacity: {
if(year >= d.yearRing.x && year <= d.yearRing.y){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
color: {
if(toYear){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
d.displayDate = new Date(year,0,1)
d.pageIndex = 1
}
}
}
}
}
Component{
id:com_page_two
ListView{
id:listview
ScrollBar.vertical: FluScrollBar {}
highlightRangeMode: ListView.StrictlyEnforceRange
clip: true
boundsBehavior: ListView.StopAtBounds
spacing: 0
highlightMoveDuration: 100
model: {
var fromYear = calender_model.from.getFullYear()
var toYear = calender_model.to.getFullYear()
var yearsArray = []
for (var i = fromYear; i <= toYear; i++) {
yearsArray.push(i)
}
return yearsArray
}
currentIndex: -1
onCurrentIndexChanged:{
var year = model[currentIndex]
var month = d.displayDate.getMonth()
d.displayDate = new Date(year,month,1)
}
Connections{
target: d
function onNextButton(){
listview.currentIndex = Math.min(listview.currentIndex+1,listview.count-1)
}
function onPreviousButton(){
listview.currentIndex = Math.max(listview.currentIndex-1,0)
}
}
Component.onCompleted: {
listview.highlightMoveDuration = 0
currentIndex = model.indexOf(d.displayDate.getFullYear())
timer_delay.restart()
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
listview.highlightMoveDuration = 100
}
}
delegate: Item{
id:layout_congrol
property int year : modelData
width: listview.width
height: 75*3
GridView{
anchors.fill: parent
cellHeight: 75
cellWidth: 75
clip: true
interactive: false
boundsBehavior: GridView.StopAtBounds
model: 12
delegate: Item{
property int month : modelData
property bool toMonth: layout_congrol.year === d.toDay.getFullYear() && month === d.toDay.getMonth()
implicitHeight: 75
implicitWidth: 75
FluControl{
id:control_delegate
width: 60
height: 60
anchors.centerIn: parent
Rectangle{
width: 48
height: 48
radius: width/2
color: {
if(toMonth){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
FluText{
text: new Date(layout_congrol.year,month).toLocaleString(FluApp.locale, "MMMM")
anchors.centerIn: parent
opacity: {
if(layout_congrol.year === d.displayDate.getFullYear()){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
color: {
if(toMonth){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
d.displayDate = new Date(layout_congrol.year,month)
d.pageIndex = 0
}
}
}
}
}
}
}
Component{
id:com_page_one
ColumnLayout {
DayOfWeekRow {
id: dayOfWeekRow
locale: FluApp.locale
font.bold: false
delegate: Label {
text: model.shortName
font: dayOfWeekRow.font
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
Layout.column: 1
Layout.fillWidth: true
}
ListView{
id:listview
property bool isCompleted: false
Layout.fillWidth: true
Layout.fillHeight: true
highlightRangeMode: ListView.StrictlyEnforceRange
clip: true
boundsBehavior: ListView.StopAtBounds
spacing: 0
highlightMoveDuration: 100
currentIndex: -1
ScrollBar.vertical: FluScrollBar {}
onCurrentIndexChanged:{
if(isCompleted){
var month = calender_model.monthAt(currentIndex)
var year = calender_model.yearAt(currentIndex)
d.displayDate = new Date(year,month,1)
}
}
Component.onCompleted: {
listview.model = calender_model
listview.highlightMoveDuration = 0
currentIndex = calender_model.indexOf(d.displayDate)
timer_delay.restart()
isCompleted = true
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
listview.highlightMoveDuration = 100
}
}
Connections{
target: d
function onNextButton(){
listview.currentIndex = Math.min(listview.currentIndex+1,listview.count-1)
}
function onPreviousButton(){
listview.currentIndex = Math.max(listview.currentIndex-1,0)
}
}
delegate: MonthGrid {
id: grid
width: listview.width
height: listview.height
month: model.month
year: model.year
spacing: 0
locale: FluApp.locale
delegate: FluControl {
required property bool today
required property int year
required property int month
required property int day
required property int visibleMonth
id: control_delegate
visibleMonth: grid.month
implicitHeight: 40
implicitWidth: 40
Rectangle{
width: 34
height: 34
radius: width/2
color: {
if(today){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
Rectangle{
width: 40
height: 40
border.width: 1
anchors.centerIn: parent
radius: width/2
border.color: FluTheme.primaryColor
color: FluColors.Transparent
visible: {
if(control.current){
var y = control.current.getFullYear()
var m = control.current.getMonth()
var d = control.current.getDate()
if(y === year && m === month && d === day){
return true
}
return false
}
return false
}
}
FluText{
text: day
opacity: {
if(month === grid.month){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
anchors.centerIn: parent
color: {
if(today){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
control.current = new Date(year,month,day)
control.accepted()
popup.close()
}
}
background: Item {
x: grid.leftPadding
y: grid.topPadding
width: grid.availableWidth
height: grid.availableHeight
}
}
}
}
}
}
}
}
}
background: Item{
@ -112,11 +647,6 @@ Rectangle {
}
}
function showPopup() {
if(current){
container.currentDate = current
container.date = current
container.updateMouth(current)
}
var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){
popup.y = control.height

View File

@ -1,433 +0,0 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import FluentUI 1.0
Item {
property int displayMode: FluCalendarViewType.Month
property var date: new Date()
property var currentDate : new Date()
property var toDay: new Date()
property int radius: 5
signal dateClicked(var date)
id:control
width: 280
height: 325
Component.onCompleted: {
updateMouth(date)
}
Component{
id:com_week
Item{
height: 40
width: 40
FluText{
text:name
anchors.centerIn: parent
}
}
}
Component{
id:com_year
Button{
id:item_control
property bool isYear: control.toDay.getFullYear() === date.getFullYear()
height: 70
width: 70
onClicked:{
control.date = date
displayMode = FluCalendarViewType.Year
updateYear(date)
}
background: Item{
Rectangle{
width: 60
height: 60
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 50
height: 50
radius: 25
visible: isYear
color: FluTheme.primaryColor
}
FluText{
text:date.getFullYear()
anchors.centerIn: parent
color: {
if(isYear){
return "#FFFFFF"
}
if(isDecade){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
Component{
id:com_month
Button{
id:item_control
property bool isYear: control.date.getFullYear() === date.getFullYear()
property bool isMonth: control.toDay.getFullYear() === date.getFullYear() && control.toDay.getMonth() === date.getMonth()
height: 70
width: 70
onClicked:{
control.date = date
displayMode = FluCalendarViewType.Month
updateMouth(date)
}
background: Item{
Rectangle{
width: 60
height: 60
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 50
height: 50
radius: 25
visible: isMonth
color: FluTheme.primaryColor
}
FluText{
text:(date.getMonth()+1)+"月"
anchors.centerIn: parent
color: {
if(isMonth){
return "#FFFFFF"
}
if(isYear){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
Component{
id:com_day
Button{
id:item_control
property bool isMonth: control.date.getMonth() === date.getMonth()
property bool isDay: control.currentDate.getFullYear() === date.getFullYear() && control.currentDate.getMonth() === date.getMonth() && control.currentDate.getDate() === date.getDate()
property bool isToDay: control.toDay.getFullYear() === date.getFullYear() && control.toDay.getMonth() === date.getMonth() && control.toDay.getDate() === date.getDate()
height: 40
width: 40
onClicked: {
currentDate = date
control.dateClicked(date)
}
background: Item{
Rectangle{
width: 36
height: 36
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_today
anchors.centerIn: parent
width: 36
height: 36
radius: 18
color:"#00000000"
visible: isDay
border.color: FluTheme.primaryColor
border.width: 1
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 30
height: 30
radius: 15
visible: isToDay
color: FluTheme.primaryColor
}
FluText{
text:date.getDate()
anchors.centerIn: parent
color: {
if(isToDay){
return "#FFFFFF"
}
if(isMonth){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
FluArea{
anchors.fill: parent
radius: control.radius
Rectangle{
id:layout_divider
height: 1
width: parent.width
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
anchors{
top: parent.top
topMargin: 44
}
}
Item{
id:layout_top
anchors{
left: parent.left
right: parent.right
top: parent.top
bottom: layout_divider.top
}
FluTextButton{
id:title
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 14
}
disabled: displayMode === FluCalendarViewType.Decade
onClicked:{
if(displayMode === FluCalendarViewType.Month){
displayMode = FluCalendarViewType.Year
updateYear(date)
}else if(displayMode === FluCalendarViewType.Year){
displayMode = FluCalendarViewType.Decade
updateDecade(date)
}
}
}
FluIconButton{
id:icon_up
iconSource: FluentIcons.CaretUpSolid8
iconSize: 10
anchors{
verticalCenter: parent.verticalCenter
right: icon_down.left
rightMargin: 14
}
onClicked: {
var year = date.getFullYear()
var month = date.getMonth()
if(displayMode === FluCalendarViewType.Month){
var lastMonthYear = year;
var lastMonthMonth = month - 1
if (month === 0) {
lastMonthYear = year - 1
lastMonthMonth = 11
}
date = new Date(lastMonthYear,lastMonthMonth,1)
updateMouth(date)
}else if(displayMode === FluCalendarViewType.Year){
date = new Date(year-1,month,1)
updateYear(date)
}else if(displayMode === FluCalendarViewType.Decade){
date = new Date(Math.floor(year / 10) * 10-10,month,1)
updateDecade(date)
}
}
}
FluIconButton{
id:icon_down
iconSource: FluentIcons.CaretDownSolid8
iconSize: 10
anchors{
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 8
}
onClicked: {
var year = date.getFullYear()
var month = date.getMonth()
if(displayMode === FluCalendarViewType.Month){
var nextMonthYear = year
var nextMonth = month + 1
if (month === 11) {
nextMonthYear = year + 1
nextMonth = 0
}
date = new Date(nextMonthYear,nextMonth,1)
updateMouth(date)
}else if(displayMode === FluCalendarViewType.Year){
date = new Date(year+1,month,1)
updateYear(date)
}else if(displayMode === FluCalendarViewType.Decade){
date = new Date(Math.floor(year / 10) * 10+10,month,1)
updateDecade(date)
}
}
}
}
ListModel {
id:list_model
}
Item{
id:layout_bottom
anchors{
left: parent.left
right: parent.right
top: layout_divider.bottom
bottom: parent.bottom
}
GridView{
model: list_model
anchors.fill: parent
cellHeight: displayMode === FluCalendarViewType.Month ? 40 : 70
cellWidth: displayMode === FluCalendarViewType.Month ? 40 : 70
clip: true
boundsBehavior:Flickable.StopAtBounds
delegate: FluLoader{
property var modelData : model
property var name : model.name
property var date : model.date
property var isDecade: {
return model.isDecade
}
sourceComponent: {
if(model.type === 0){
return com_week
}
if(model.type === 1){
return com_day
}
if(model.type === 2){
return com_month
}
if(model.type === 3){
return com_year
}
return com_day
}
}
}
}
}
function createItemWeek(name){
return {type:0,date:new Date(),name:name,isDecade:false}
}
function createItemDay(date){
return {type:1,date:date,name:"",isDecade:false}
}
function createItemMonth(date){
return {type:2,date:date,name:"",isDecade:false}
}
function createItemYear(date,isDecade){
return {type:3,date:date,name:"",isDecade:isDecade}
}
function updateDecade(date){
list_model.clear()
var year = date.getFullYear()
const decadeStart = Math.floor(year / 10) * 10;
for(var i = decadeStart ; i< decadeStart+10 ; i++){
list_model.append(createItemYear(new Date(i,0,1),true));
}
for(var j = decadeStart+10 ; j< decadeStart+16 ; j++){
list_model.append(createItemYear(new Date(j,0,1),false));
}
title.text = decadeStart+"-"+(decadeStart+10)
}
function updateYear(date){
list_model.clear()
var year = date.getFullYear()
for(var i = 0 ; i< 12 ; i++){
list_model.append(createItemMonth(new Date(year,i)));
}
for(var j = 0 ; j< 4 ; j++){
list_model.append(createItemMonth(new Date(year+1,j)));
}
title.text = year+"年"
}
function updateMouth(date){
list_model.clear()
list_model.append([createItemWeek("一"),createItemWeek("二"),createItemWeek("三"),createItemWeek("四"),createItemWeek("五"),createItemWeek("六"),createItemWeek("日")])
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
var firstDayOfMonth = new Date(year, month, 1)
var dayOfWeek = firstDayOfMonth.getDay()
var headerSize = (dayOfWeek===0?7:dayOfWeek)-1
if(headerSize!==0){
var lastMonthYear = year;
var lastMonthMonth = month - 1
if (month === 0) {
lastMonthYear = year - 1
lastMonthMonth = 11
}
var lastMonthDays = new Date(lastMonthYear, lastMonthMonth+1, 0).getDate()
for (var i = headerSize-1; i >= 0; i--) {
list_model.append(createItemDay(new Date(lastMonthYear, lastMonthMonth,lastMonthDays-i)))
}
}
const lastDayOfMonth = new Date(year, month+1, 0).getDate()
for (let day = 1; day <= lastDayOfMonth; day++) {
list_model.append(createItemDay(new Date(year, month,day)))
}
var footerSize = 49-list_model.count
var nextMonthYear = year
var nextMonth = month + 1
if (month === 11) {
nextMonthYear = year + 1
nextMonth = 0
}
const nextDayOfMonth = new Date(nextMonthYear, nextMonth+1, 0).getDate()
for (let j = 1; j <= footerSize; j++) {
list_model.append(createItemDay(new Date(nextMonthYear, nextMonth,j)))
}
title.text = year+"年"+(month+1)+"月"
}
}

View File

@ -8,9 +8,9 @@ FluPopup {
id: control
property string title: ""
property string message: ""
property string neutralText: "Close"
property string negativeText: "Cancel"
property string positiveText: "OK"
property string neutralText: qsTr("Close")
property string negativeText: qsTr("Cancel")
property string positiveText: qsTr("OK")
property int messageTextFormart: Text.AutoText
property int delayTime: 100
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton

View File

@ -10,11 +10,11 @@ Rectangle {
property color normalColor: FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
property bool showYear: true
property var current
property string yearText: "年"
property string monthText: "月"
property string dayText: "日"
property string cancelText: "取消"
property string okText: "确定"
property string yearText: qsTr("Year")
property string monthText: qsTr("Month")
property string dayText: qsTr("Day")
property string cancelText: qsTr("Cancel")
property string okText: qsTr("OK")
signal accepted()
id:control
color: {

View File

@ -20,6 +20,7 @@ Item {
d.flag = false
}
}
clip: true
Rectangle{
id:layout_header
width: parent.width
@ -79,10 +80,10 @@ Item {
topMargin: -1
left: layout_header.left
}
clip: true
visible: contentHeight+container.anchors.topMargin !== 0
height: contentHeight+container.anchors.topMargin
width: parent.width
z:-999
Rectangle{
id:container
anchors.fill: parent

View File

@ -3,7 +3,7 @@ import QtQuick.Controls 2.15
import FluentUI 1.0
Image {
property string errorButtonText: "重新加载"
property string errorButtonText: qsTr("Reload")
property var clickErrorListener : function(){
image.source = ""
image.source = control.source

View File

@ -5,8 +5,8 @@ import FluentUI 1.0
Item {
signal requestPage(int page,int count)
property string previousText: "<上一页"
property string nextText: "下一页>"
property string previousText: qsTr("<Previous")
property string nextText: qsTr("Next>")
property int pageCurrent: 0
property int itemCount: 0
property int pageButtonCount: 5

View File

@ -5,11 +5,11 @@ import FluentUI 1.0
FluIconButton {
id:control
property var current : ["Ctrl","Shift","A"]
property string title: "激活快捷键"
property string message: "按下组合键以更改此快捷键"
property string positiveText: "保存"
property string neutralText: "取消"
property string negativeText: "重置"
property string title: qsTr("Activate the Shortcut")
property string message: qsTr("Press the key combination to change the shortcut")
property string positiveText: qsTr("Save")
property string neutralText: qsTr("Cancel")
property string negativeText: qsTr("Reset")
signal accepted()
QtObject{
id: d

View File

@ -3,10 +3,10 @@ import QtQuick.Controls 2.15
import FluentUI 1.0
FluMenu{
property string cutText : "剪切"
property string copyText : "复制"
property string pasteText : "粘贴"
property string selectAllText : "全选"
property string cutText : qsTr("Cut")
property string copyText : qsTr("Copy")
property string pasteText : qsTr("Paste")
property string selectAllText : qsTr("Select All")
property var inputItem
id:menu
enableAnimation: false

View File

@ -10,9 +10,9 @@ Popup{
property Component nextButton: com_next_button
property Component prevButton: com_prev_button
property int index : 0
property string finishText: "结束导览"
property string nextText: "下一步"
property string previousText: "上一步"
property string finishText: qsTr("Finish")
property string nextText: qsTr("Next")
property string previousText: qsTr("Previous")
id:control
padding: 0
parent: Overlay.overlay

View File

@ -237,13 +237,13 @@ Window {
clip: true
}
FluLoader{
property string loadingText: "加载中..."
property string loadingText
property bool cancel: false
id:loader_loading
anchors.fill: parent
}
FluInfoBar{
id:infoBar
id:info_bar
root: window
}
FluWindowLifecycle{
@ -268,7 +268,7 @@ Window {
function destoryOnClose(){
lifecycle.onDestoryOnClose()
}
function showLoading(text = "加载中...",cancel = true){
function showLoading(text = qsTr("Loading..."),cancel = true){
loader_loading.loadingText = text
loader_loading.cancel = cancel
loader_loading.sourceComponent = com_loading
@ -277,21 +277,21 @@ Window {
loader_loading.sourceComponent = undefined
}
function showSuccess(text,duration,moremsg){
infoBar.showSuccess(text,duration,moremsg)
info_bar.showSuccess(text,duration,moremsg)
}
function showInfo(text,duration,moremsg){
infoBar.showInfo(text,duration,moremsg)
info_bar.showInfo(text,duration,moremsg)
}
function showWarning(text,duration,moremsg){
infoBar.showWarning(text,duration,moremsg)
info_bar.showWarning(text,duration,moremsg)
}
function showError(text,duration,moremsg){
infoBar.showError(text,duration,moremsg)
info_bar.showError(text,duration,moremsg)
}
function moveWindowToDesktopCenter(){
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
var taskBarHeight = FluTools.getTaskBarHeight(window)
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height-taskBarHeight)/2+Screen.virtualY,window.width,window.height)
var availableGeometry = FluTools.desktopAvailableGeometry(window)
window.setGeometry((availableGeometry.width-window.width)/2+Screen.virtualX,(availableGeometry.height-window.height)/2+Screen.virtualY,window.width,window.height)
}
function fixWindowSize(){
if(fixSize){

View File

@ -0,0 +1,33 @@
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import FluentUI 1.0
FluWindow {
id:control
property Component contentDelegate
autoVisible: false
autoCenter: false
autoDestory: true
fixSize: true
Loader{
anchors.fill: parent
sourceComponent: {
if(control.autoDestory){
return control.visible ? control.contentDelegate : undefined
}
return control.contentDelegate
}
}
closeListener: function(event){
visible = false
event.accepted = false
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
var y = transientParent.y + (transientParent.height - height)/2
setGeometry(x,y,width,height)
visible = true
}
}

View File

@ -2322,6 +2322,7 @@ Module {
defaultProperty: "data"
Property { name: "title"; type: "string" }
Property { name: "darkText"; type: "string" }
Property { name: "lightText"; type: "string" }
Property { name: "minimizeText"; type: "string" }
Property { name: "restoreText"; type: "string" }
Property { name: "maximizeText"; type: "string" }
@ -2357,31 +2358,31 @@ Module {
Property { name: "systemMenuListener"; type: "QVariant" }
Property {
name: "buttonStayTop"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
Property {
name: "buttonMinimize"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
Property {
name: "buttonMaximize"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
Property {
name: "buttonClose"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
Property {
name: "buttonDark"
type: "FluToggleSwitch_QMLTYPE_22"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
@ -2417,22 +2418,11 @@ Module {
Property { name: "items"; type: "QVariant" }
Property { name: "emptyText"; type: "string" }
Property { name: "autoSuggestBoxReplacement"; type: "int" }
Property { name: "filter"; type: "QVariant" }
Signal {
name: "itemClicked"
Parameter { name: "data"; type: "QVariant" }
}
Signal { name: "handleClicked" }
Method {
name: "handleClick"
type: "QVariant"
Parameter { name: "modelData"; type: "QVariant" }
}
Method {
name: "updateText"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
}
Method { name: "loadData"; type: "QVariant" }
Property { name: "disabled"; type: "bool" }
Property { name: "iconSource"; type: "int" }
Property { name: "normalColor"; type: "QColor" }
@ -2506,62 +2496,11 @@ Module {
Property { name: "hoverColor"; type: "QColor" }
Property { name: "normalColor"; type: "QColor" }
Property { name: "text"; type: "string" }
Property { name: "from"; type: "QDateTime" }
Property { name: "to"; type: "QDateTime" }
Property { name: "current"; type: "QVariant" }
Signal { name: "accepted" }
}
Component {
prototype: "QQuickItem"
name: "FluentUI/FluCalendarView 1.0"
exports: ["FluentUI/FluCalendarView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
Property { name: "displayMode"; type: "int" }
Property { name: "date"; type: "QVariant" }
Property { name: "currentDate"; type: "QVariant" }
Property { name: "toDay"; type: "QVariant" }
Property { name: "radius"; type: "int" }
Signal {
name: "dateClicked"
Parameter { name: "date"; type: "QVariant" }
}
Method {
name: "createItemWeek"
type: "QVariant"
Parameter { name: "name"; type: "QVariant" }
}
Method {
name: "createItemDay"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
}
Method {
name: "createItemMonth"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
}
Method {
name: "createItemYear"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
Parameter { name: "isDecade"; type: "QVariant" }
}
Method {
name: "updateDecade"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
}
Method {
name: "updateYear"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
}
Method {
name: "updateMouth"
type: "QVariant"
Parameter { name: "date"; type: "QVariant" }
}
}
Component {
prototype: "QQuickItem"
name: "FluentUI/FluCarousel 1.0"
@ -2900,6 +2839,17 @@ Module {
Property { name: "errorItem"; type: "QQmlComponent"; isPointer: true }
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
}
Component {
prototype: "QQuickButton"
name: "FluentUI/FluImageButton 1.0"
exports: ["FluentUI/FluImageButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
Property { name: "normalImage"; type: "string" }
Property { name: "hoveredImage"; type: "string" }
Property { name: "pushedImage"; type: "string" }
}
Component {
prototype: "QObject"
name: "FluentUI/FluInfoBar 1.0"
@ -3052,15 +3002,15 @@ Module {
defaultProperty: "data"
Property { name: "logo"; type: "QUrl" }
Property { name: "title"; type: "string" }
Property { name: "items"; type: "FluObject_QMLTYPE_157"; isPointer: true }
Property { name: "footerItems"; type: "FluObject_QMLTYPE_157"; isPointer: true }
Property { name: "items"; type: "FluObject_QMLTYPE_166"; isPointer: true }
Property { name: "footerItems"; type: "FluObject_QMLTYPE_166"; isPointer: true }
Property { name: "displayMode"; type: "int" }
Property { name: "autoSuggestBox"; type: "QQmlComponent"; isPointer: true }
Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true }
Property { name: "topPadding"; type: "int" }
Property { name: "pageMode"; type: "int" }
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_47"; isPointer: true }
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_47"; isPointer: true }
Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_40"; isPointer: true }
Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_40"; isPointer: true }
Property { name: "navCompactWidth"; type: "int" }
Property { name: "navTopMargin"; type: "int" }
Property { name: "cellHeight"; type: "int" }
@ -3068,13 +3018,13 @@ Module {
Property { name: "hideNavAppBar"; type: "bool" }
Property {
name: "buttonMenu"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
Property {
name: "buttonBack"
type: "FluIconButton_QMLTYPE_17"
type: "FluIconButton_QMLTYPE_18"
isReadonly: true
isPointer: true
}
@ -3960,4 +3910,98 @@ Module {
}
Method { name: "showMaximized"; type: "QVariant" }
}
Component {
prototype: "QQuickWindowQmlImpl"
name: "FluentUI/FluWindowDialog 1.0"
exports: ["FluentUI/FluWindowDialog 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "contentData"
Property { name: "contentDelegate"; type: "QQmlComponent"; isPointer: true }
Method { name: "showDialog"; type: "QVariant" }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "windowIcon"; type: "string" }
Property { name: "launchMode"; type: "int" }
Property { name: "argument"; type: "QVariant" }
Property { name: "background"; type: "QVariant" }
Property { name: "fixSize"; type: "bool" }
Property { name: "loadingItem"; type: "QQmlComponent"; isPointer: true }
Property { name: "fitsAppBarWindows"; type: "bool" }
Property { name: "appBar"; type: "QQuickItem"; isPointer: true }
Property { name: "backgroundColor"; type: "QColor" }
Property { name: "stayTop"; type: "bool" }
Property { name: "showDark"; type: "bool" }
Property { name: "showClose"; type: "bool" }
Property { name: "showMinimize"; type: "bool" }
Property { name: "showMaximize"; type: "bool" }
Property { name: "showStayTop"; type: "bool" }
Property { name: "autoMaximize"; type: "bool" }
Property { name: "autoVisible"; type: "bool" }
Property { name: "autoCenter"; type: "bool" }
Property { name: "autoDestory"; type: "bool" }
Property { name: "useSystemAppBar"; type: "bool" }
Property { name: "resizeBorderColor"; type: "QColor" }
Property { name: "resizeBorderWidth"; type: "int" }
Property { name: "closeListener"; type: "QVariant" }
Property { name: "_realHeight"; type: "int" }
Property { name: "_realWidth"; type: "int" }
Property { name: "_appBarHeight"; type: "int" }
Property { name: "_windowRegister"; type: "QVariant" }
Property { name: "_route"; type: "string" }
Signal { name: "showSystemMenu" }
Signal {
name: "initArgument"
Parameter { name: "argument"; type: "QVariant" }
}
Signal { name: "firstVisible" }
Method { name: "destoryOnClose"; type: "QVariant" }
Method {
name: "showLoading"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
Parameter { name: "cancel"; type: "QVariant" }
}
Method { name: "hideLoading"; type: "QVariant" }
Method {
name: "showSuccess"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
Parameter { name: "duration"; type: "QVariant" }
Parameter { name: "moremsg"; type: "QVariant" }
}
Method {
name: "showInfo"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
Parameter { name: "duration"; type: "QVariant" }
Parameter { name: "moremsg"; type: "QVariant" }
}
Method {
name: "showWarning"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
Parameter { name: "duration"; type: "QVariant" }
Parameter { name: "moremsg"; type: "QVariant" }
}
Method {
name: "showError"
type: "QVariant"
Parameter { name: "text"; type: "QVariant" }
Parameter { name: "duration"; type: "QVariant" }
Parameter { name: "moremsg"; type: "QVariant" }
}
Method { name: "moveWindowToDesktopCenter"; type: "QVariant" }
Method { name: "fixWindowSize"; type: "QVariant" }
Method {
name: "registerForWindowResult"
type: "QVariant"
Parameter { name: "path"; type: "QVariant" }
}
Method {
name: "onResult"
type: "QVariant"
Parameter { name: "data"; type: "QVariant" }
}
Method { name: "showMaximized"; type: "QVariant" }
}
}

View File

@ -3,12 +3,6 @@ classname FluentUIPlugin
designersupported
typeinfo plugins.qmltypes
ColorPicker 1.0 Controls/ColorPicker/ColorPicker.qml
Checkerboard 1.0 Controls/ColorPicker/Content/Checkerboard.qml
ColorSlider 1.0 Controls/ColorPicker/Content/ColorSlider.qml
NumberBox 1.0 Controls/ColorPicker/Content/NumberBox.qml
PanelBorder 1.0 Controls/ColorPicker/Content/PanelBorder.qml
SBPicker 1.0 Controls/ColorPicker/Content/SBPicker.qml
FluAcrylic 1.0 Controls/FluAcrylic.qml
FluAppBar 1.0 Controls/FluAppBar.qml
FluArea 1.0 Controls/FluArea.qml
@ -17,12 +11,11 @@ FluBadge 1.0 Controls/FluBadge.qml
FluBreadcrumbBar 1.0 Controls/FluBreadcrumbBar.qml
FluButton 1.0 Controls/FluButton.qml
FluCalendarPicker 1.0 Controls/FluCalendarPicker.qml
FluCalendarView 1.0 Controls/FluCalendarView.qml
FluCarousel 1.0 Controls/FluCarousel.qml
FluChart 1.0 Controls/FluChart.qml
FluCheckBox 1.0 Controls/FluCheckBox.qml
FluClip 1.0 Controls/FluClip.qml
FluColorPicker 1.0 Controls/FluColorPicker.qml
FluColorView 1.0 Controls/FluColorView.qml
FluComboBox 1.0 Controls/FluComboBox.qml
FluContentDialog 1.0 Controls/FluContentDialog.qml
FluContentPage 1.0 Controls/FluContentPage.qml
@ -38,8 +31,11 @@ FluFocusRectangle 1.0 Controls/FluFocusRectangle.qml
FluIcon 1.0 Controls/FluIcon.qml
FluIconButton 1.0 Controls/FluIconButton.qml
FluImage 1.0 Controls/FluImage.qml
FluImageButton 1.0 Controls/FluImageButton.qml
FluInfoBar 1.0 Controls/FluInfoBar.qml
FluItemDelegate 1.0 Controls/FluItemDelegate.qml
FluLoader 1.0 Controls/FluLoader.qml
FluLoadingButton 1.0 Controls/FluLoadingButton.qml
FluMenu 1.0 Controls/FluMenu.qml
FluMenuBar 1.0 Controls/FluMenuBar.qml
FluMenuBarItem 1.0 Controls/FluMenuBarItem.qml
@ -60,20 +56,24 @@ FluPivot 1.0 Controls/FluPivot.qml
FluPivotItem 1.0 Controls/FluPivotItem.qml
FluPopup 1.0 Controls/FluPopup.qml
FluProgressBar 1.0 Controls/FluProgressBar.qml
FluProgressButton 1.0 Controls/FluProgressButton.qml
FluProgressRing 1.0 Controls/FluProgressRing.qml
FluQRCode 1.0 Controls/FluQRCode.qml
FluRadioButton 1.0 Controls/FluRadioButton.qml
FluRadioButtons 1.0 Controls/FluRadioButtons.qml
FluRangeSlider 1.0 Controls/FluRangeSlider.qml
FluRatingControl 1.0 Controls/FluRatingControl.qml
FluRemoteLoader 1.0 Controls/FluRemoteLoader.qml
FluScreenshot 1.0 Controls/FluScreenshot.qml
FluScrollBar 1.0 Controls/FluScrollBar.qml
FluScrollIndicator 1.0 Controls/FluScrollIndicator.qml
FluScrollablePage 1.0 Controls/FluScrollablePage.qml
FluShadow 1.0 Controls/FluShadow.qml
FluShortcutPicker 1.0 Controls/FluShortcutPicker.qml
FluSlider 1.0 Controls/FluSlider.qml
FluSpinBox 1.0 Controls/FluSpinBox.qml
FluStatusView 1.0 Controls/FluStatusView.qml
FluSplitLayout 1.0 Controls/FluSplitLayout.qml
FluStaggeredLayout 1.0 Controls/FluStaggeredLayout.qml
FluStatusLayout 1.0 Controls/FluStatusLayout.qml
FluTabView 1.0 Controls/FluTabView.qml
FluTableView 1.0 Controls/FluTableView.qml
FluText 1.0 Controls/FluText.qml
@ -89,13 +89,6 @@ FluTooltip 1.0 Controls/FluTooltip.qml
FluTour 1.0 Controls/FluTour.qml
FluTreeView 1.0 Controls/FluTreeView.qml
FluWindow 1.0 Controls/FluWindow.qml
FluRangeSlider 1.0 Controls/FluRangeSlider.qml
FluStaggeredView 1.0 Controls/FluStaggeredView.qml
FluProgressButton 1.0 Controls/FluProgressButton.qml
FluLoadingButton 1.0 Controls/FluLoadingButton.qml
FluClip 1.0 Controls/FluClip.qml
FluLoader 1.0 Controls/FluLoader.qml
FluShortcutPicker 1.0 Controls/FluShortcutPicker.qml
FluSplitLayout 1.0 Controls/FluSplitLayout.qml
FluStaggeredLayout 1.0 Controls/FluStaggeredLayout.qml
FluWindowDialog 1.0 Controls/FluWindowDialog.qml
plugin fluentuiplugin

View File

@ -11,7 +11,6 @@
<file>FluentUI/Controls/FluBreadcrumbBar.qml</file>
<file>FluentUI/Controls/FluButton.qml</file>
<file>FluentUI/Controls/FluCalendarPicker.qml</file>
<file>FluentUI/Controls/FluCalendarView.qml</file>
<file>FluentUI/Controls/FluCarousel.qml</file>
<file>FluentUI/Controls/FluChart.qml</file>
<file>FluentUI/Controls/FluCheckBox.qml</file>
@ -99,5 +98,8 @@
<file>FluentUI/Image/btn_min_pushed.png</file>
<file>FluentUI/Controls/FluImageButton.qml</file>
<file>FluentUI/Controls/FluSplitLayout.qml</file>
<file>FluentUI/i18n/fluentuiplugin_en_US.qm</file>
<file>FluentUI/i18n/fluentuiplugin_zh_CN.qm</file>
<file>FluentUI/Controls/FluWindowDialog.qml</file>
</qresource>
</RCC>

View File

@ -6,13 +6,14 @@ import FluentUI
Rectangle{
property string title: ""
property string darkText : "夜间模式"
property string minimizeText : "最小化"
property string restoreText : "向下还原"
property string maximizeText : "最大化"
property string closeText : "关闭"
property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶"
property string darkText : qsTr("Dark")
property string lightText : qsTr("Light")
property string minimizeText : qsTr("Minimize")
property string restoreText : qsTr("Restore")
property string maximizeText : qsTr("Maximize")
property string closeText : qsTr("Close")
property string stayTopText : qsTr("Sticky on Top")
property string stayTopCancelText : qsTr("Sticky on Top cancelled")
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor
@ -49,7 +50,11 @@ Rectangle{
}
}
property var minClickListener: function(){
d.win.showMinimized()
if(d.win.transientParent != null){
d.win.transientParent.showMinimized()
}else{
d.win.showMinimized()
}
}
property var closeClickListener : function(){
d.win.close()
@ -199,24 +204,33 @@ Rectangle{
Component.onCompleted: {
setHitTestVisible(layout_row)
}
FluToggleSwitch{
FluIconButton{
id:btn_dark
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
rightPadding: 2
iconSource: FluTheme.dark ? FluentIcons.Brightness : FluentIcons.QuietHours
Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: 5
iconSize: 15
visible: showDark
text:darkText
textColor:control.textColor
checked: FluTheme.dark
textRight: false
clickListener:()=> darkClickListener(btn_dark)
text: FluTheme.dark ? control.lightText : control.darkText
radius: 0
iconColor:control.textColor
onClicked:()=> darkClickListener(btn_dark)
}
FluIconButton{
id:btn_stay_top
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.Pinned
Layout.alignment: Qt.AlignVCenter
iconSize: 13
iconSize: 14
visible: {
if(!(d.win instanceof FluWindow)){
return false
@ -232,6 +246,9 @@ Rectangle{
id:btn_minimize
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.ChromeMinimize
Layout.alignment: Qt.AlignVCenter
iconSize: 11
@ -251,6 +268,9 @@ Rectangle{
id:btn_maximize
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : d.isRestore ? FluentIcons.ChromeRestore : FluentIcons.ChromeMaximize
color: {
if(down){
@ -271,11 +291,14 @@ Rectangle{
}
FluIconButton{
id:btn_close
Layout.preferredWidth: 40
Layout.preferredHeight: 30
padding: 0
verticalPadding: 0
horizontalPadding: 0
iconSource : FluentIcons.ChromeClose
Layout.alignment: Qt.AlignVCenter
text:closeText
Layout.preferredWidth: 40
Layout.preferredHeight: 30
visible: !isMac && showClose
radius: 0
iconSize: 10

View File

@ -4,18 +4,46 @@ import FluentUI
FluTextBox{
property var items:[]
property string emptyText: "没有找到结果"
property string emptyText: qsTr("No results found")
property int autoSuggestBoxReplacement: FluentIcons.Search
property var window : Window.window
property var filter: function(item){
if(item.title.indexOf(control.text)!==-1){
return true
}
return false
}
signal itemClicked(var data)
signal handleClicked
id:control
Component.onCompleted: {
loadData()
d.loadData()
}
QtObject{
Item{
id:d
property bool flagVisible: true
property var window : Window.window
function handleClick(modelData){
control_popup.visible = false
control.itemClicked(modelData)
d.updateText(modelData.title)
}
function updateText(text){
d.flagVisible = false
control.text = text
d.flagVisible = true
}
function loadData(){
var result = []
if(items==null){
list_view.model = result
return
}
items.map(function(item){
if(control.filter(item)){
result.push(item)
}
})
list_view.model = result
}
}
onActiveFocusChanged: {
if(!activeFocus){
@ -65,7 +93,7 @@ FluTextBox{
height: 38
width: control.width
onClicked:{
handleClick(modelData)
d.handleClick(modelData)
}
background: Rectangle{
FluFocusRectangle{
@ -95,40 +123,17 @@ FluTextBox{
}
}
onTextChanged: {
loadData()
d.loadData()
if(d.flagVisible){
var pos = control.mapToItem(null, 0, 0)
if(window.height>pos.y+control.height+container.implicitHeight){
if(d.window.height>pos.y+control.height+container.implicitHeight){
control_popup.y = control.height
} else if(pos.y>container.implicitHeight){
control_popup.y = -container.implicitHeight
} else {
control_popup.y = window.height-(pos.y+container.implicitHeight)
control_popup.y = d.window.height-(pos.y+container.implicitHeight)
}
control_popup.visible = true
}
}
function handleClick(modelData){
control_popup.visible = false
control.itemClicked(modelData)
updateText(modelData.title)
}
function updateText(text){
d.flagVisible = false
control.text = text
d.flagVisible = true
}
function loadData(){
var result = []
if(items==null){
list_view.model = result
return
}
items.map(function(item){
if(item.title.indexOf(control.text)!==-1){
result.push(item)
}
})
list_view.model = result
}
}

View File

@ -8,7 +8,9 @@ Rectangle {
property color dividerColor: FluTheme.dark ? Qt.rgba(77/255,77/255,77/255,1) : Qt.rgba(239/255,239/255,239/255,1)
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(251/255,251/255,251/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
property string text: "请选择日期"
property string text: qsTr("Pick a date")
property date from: new Date(1924, 0, 1)
property date to: new Date(2124, 11, 31)
property var current
signal accepted()
id:control
@ -23,15 +25,6 @@ Rectangle {
radius: 4
border.width: 1
border.color: dividerColor
Component.onCompleted: {
if(current){
const date = current
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
text_date.text = year+"-"+(month+1)+"-"+day
}
}
MouseArea{
id:mouse_area
hoverEnabled: true
@ -40,9 +33,25 @@ Rectangle {
popup.showPopup()
}
}
CalendarModel {
id:calender_model
from: control.from
to: control.to
}
Item{
id:d
property var window : Window.window
property date displayDate: {
if(control.current){
return control.current
}
return new Date()
}
property date toDay : new Date()
property int pageIndex: 0
signal nextButton
signal previousButton
property point yearRing : Qt.point(0,0)
}
FluText{
id:text_date
@ -55,7 +64,12 @@ Rectangle {
}
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text:control.text
text:{
if(control.current){
return control.current.toLocaleDateString(FluApp.locale,"yyyy/M/d")
}
return control.text
}
}
FluIcon{
iconSource: FluentIcons.Calendar
@ -92,18 +106,538 @@ Rectangle {
}
contentItem: Item{
clip: true
FluCalendarView{
FluArea{
id:container
onDateClicked:
(date)=>{
popup.close()
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
text_date.text = year+"-"+(month+1)+"-"+day
current= date
control.accepted()
width: 300
height: 360
ColumnLayout {
anchors.fill: parent
spacing: 0
Item{
Layout.fillWidth: true
Layout.preferredHeight: 50
RowLayout{
anchors.fill: parent
spacing: 10
Item{
Layout.leftMargin: parent.spacing
Layout.fillWidth: true
Layout.fillHeight: true
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: d.displayDate.toLocaleString(FluApp.locale, "MMMM yyyy")
verticalAlignment: Text.AlignVCenter
}
visible: d.pageIndex === 0
onClicked: {
d.pageIndex = 1
}
}
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: d.displayDate.toLocaleString(FluApp.locale, "yyyy")
verticalAlignment: Text.AlignVCenter
}
visible: d.pageIndex === 1
onClicked: {
d.pageIndex = 2
}
}
FluTextButton{
width: parent.width
anchors.centerIn: parent
contentItem: FluText {
text: "%1-%2".arg(d.yearRing.x).arg(d.yearRing.y)
verticalAlignment: Text.AlignVCenter
textColor: FluTheme.fontTertiaryColor
}
visible: d.pageIndex === 2
}
}
FluIconButton{
id:icon_up
iconSource: FluentIcons.CaretUpSolid8
iconSize: 10
onClicked: {
d.previousButton()
}
}
FluIconButton{
id:icon_down
iconSource: FluentIcons.CaretDownSolid8
iconSize: 10
Layout.rightMargin: parent.spacing
onClicked: {
d.nextButton()
}
}
}
FluDivider{
width: parent.width
height: 1
anchors.bottom: parent.bottom
}
}
Item{
Layout.fillWidth: true
Layout.fillHeight: true
StackView{
id:stack_view
anchors.fill: parent
initialItem: com_page_one
replaceEnter : Transition{
OpacityAnimator{
from: 0
to: 1
duration: 88
}
ScaleAnimator{
from: 0.5
to: 1
duration: 167
easing.type: Easing.OutCubic
}
}
replaceExit : Transition{
OpacityAnimator{
from: 1
to: 0
duration: 88
}
ScaleAnimator{
from: 1.0
to: 0.5
duration: 167
easing.type: Easing.OutCubic
}
}
}
Connections{
target: d
function onPageIndexChanged(){
if(d.pageIndex === 0){
stack_view.replace(com_page_one)
}
if(d.pageIndex === 1){
stack_view.replace(com_page_two)
}
if(d.pageIndex === 2){
stack_view.replace(com_page_three)
}
}
}
Component{
id:com_page_three
GridView{
id:grid_view
cellHeight: 75
cellWidth: 75
clip: true
boundsBehavior: GridView.StopAtBounds
ScrollBar.vertical: FluScrollBar {}
model: {
var fromYear = calender_model.from.getFullYear()
var toYear = calender_model.to.getFullYear()
return toYear-fromYear+1
}
highlightRangeMode: GridView.StrictlyEnforceRange
onCurrentIndexChanged:{
var year = currentIndex + calender_model.from.getFullYear()
var start = Math.ceil(year / 10) * 10
var end = start+10
d.yearRing = Qt.point(start,end)
}
highlightMoveDuration: 100
Component.onCompleted: {
grid_view.highlightMoveDuration = 0
currentIndex = d.displayDate.getFullYear()-calender_model.from.getFullYear()
timer_delay.restart()
}
Connections{
target: d
function onNextButton(){
grid_view.currentIndex = Math.min(grid_view.currentIndex+16,grid_view.count-1)
}
function onPreviousButton(){
grid_view.currentIndex = Math.max(grid_view.currentIndex-16,0)
}
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
grid_view.highlightMoveDuration = 100
}
}
currentIndex: -1
delegate: Item{
property int year : calender_model.from.getFullYear()+modelData
property bool toYear: year === d.toDay.getFullYear()
implicitHeight: 75
implicitWidth: 75
FluControl{
id:control_delegate
width: 60
height: 60
anchors.centerIn: parent
Rectangle{
width: 48
height: 48
radius: width/2
color: {
if(toYear){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
FluText{
text: year
anchors.centerIn: parent
opacity: {
if(year >= d.yearRing.x && year <= d.yearRing.y){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
color: {
if(toYear){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
d.displayDate = new Date(year,0,1)
d.pageIndex = 1
}
}
}
}
}
Component{
id:com_page_two
ListView{
id:listview
ScrollBar.vertical: FluScrollBar {}
highlightRangeMode: ListView.StrictlyEnforceRange
clip: true
boundsBehavior: ListView.StopAtBounds
spacing: 0
highlightMoveDuration: 100
model: {
var fromYear = calender_model.from.getFullYear()
var toYear = calender_model.to.getFullYear()
var yearsArray = []
for (var i = fromYear; i <= toYear; i++) {
yearsArray.push(i)
}
return yearsArray
}
currentIndex: -1
onCurrentIndexChanged:{
var year = model[currentIndex]
var month = d.displayDate.getMonth()
d.displayDate = new Date(year,month,1)
}
Connections{
target: d
function onNextButton(){
listview.currentIndex = Math.min(listview.currentIndex+1,listview.count-1)
}
function onPreviousButton(){
listview.currentIndex = Math.max(listview.currentIndex-1,0)
}
}
Component.onCompleted: {
listview.highlightMoveDuration = 0
currentIndex = model.indexOf(d.displayDate.getFullYear())
timer_delay.restart()
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
listview.highlightMoveDuration = 100
}
}
delegate: Item{
id:layout_congrol
property int year : modelData
width: listview.width
height: 75*3
GridView{
anchors.fill: parent
cellHeight: 75
cellWidth: 75
clip: true
interactive: false
boundsBehavior: GridView.StopAtBounds
model: 12
delegate: Item{
property int month : modelData
property bool toMonth: layout_congrol.year === d.toDay.getFullYear() && month === d.toDay.getMonth()
implicitHeight: 75
implicitWidth: 75
FluControl{
id:control_delegate
width: 60
height: 60
anchors.centerIn: parent
Rectangle{
width: 48
height: 48
radius: width/2
color: {
if(toMonth){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
FluText{
text: new Date(layout_congrol.year,month).toLocaleString(FluApp.locale, "MMMM")
anchors.centerIn: parent
opacity: {
if(layout_congrol.year === d.displayDate.getFullYear()){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
color: {
if(toMonth){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
d.displayDate = new Date(layout_congrol.year,month)
d.pageIndex = 0
}
}
}
}
}
}
}
Component{
id:com_page_one
ColumnLayout {
DayOfWeekRow {
id: dayOfWeekRow
locale: FluApp.locale
font.bold: false
delegate: Label {
text: model.shortName
font: dayOfWeekRow.font
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
Layout.column: 1
Layout.fillWidth: true
}
ListView{
id:listview
property bool isCompleted: false
Layout.fillWidth: true
Layout.fillHeight: true
highlightRangeMode: ListView.StrictlyEnforceRange
clip: true
boundsBehavior: ListView.StopAtBounds
spacing: 0
highlightMoveDuration: 100
currentIndex: -1
ScrollBar.vertical: FluScrollBar {}
onCurrentIndexChanged:{
if(isCompleted){
var month = calender_model.monthAt(currentIndex)
var year = calender_model.yearAt(currentIndex)
d.displayDate = new Date(year,month,1)
}
}
Component.onCompleted: {
listview.model = calender_model
listview.highlightMoveDuration = 0
currentIndex = calender_model.indexOf(d.displayDate)
timer_delay.restart()
isCompleted = true
}
Timer{
id:timer_delay
interval: 100
onTriggered: {
listview.highlightMoveDuration = 100
}
}
Connections{
target: d
function onNextButton(){
listview.currentIndex = Math.min(listview.currentIndex+1,listview.count-1)
}
function onPreviousButton(){
listview.currentIndex = Math.max(listview.currentIndex-1,0)
}
}
delegate: MonthGrid {
id: grid
width: listview.width
height: listview.height
month: model.month
year: model.year
spacing: 0
locale: FluApp.locale
delegate: FluControl {
required property bool today
required property int year
required property int month
required property int day
required property int visibleMonth
id: control_delegate
visibleMonth: grid.month
implicitHeight: 40
implicitWidth: 40
Rectangle{
width: 34
height: 34
radius: width/2
color: {
if(today){
if(control_delegate.pressed){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.2) : Qt.lighter(FluTheme.primaryColor,1.2)
}
if(control_delegate.hovered){
return FluTheme.dark ? Qt.darker(FluTheme.primaryColor,1.1) : Qt.lighter(FluTheme.primaryColor,1.1)
}
return FluTheme.primaryColor
}else{
if(control_delegate.pressed){
return FluTheme.itemPressColor
}
if(control_delegate.hovered){
return FluTheme.itemHoverColor
}
return FluColors.Transparent
}
}
anchors.centerIn: parent
}
Rectangle{
width: 40
height: 40
border.width: 1
anchors.centerIn: parent
radius: width/2
border.color: FluTheme.primaryColor
color: FluColors.Transparent
visible: {
if(control.current){
var y = control.current.getFullYear()
var m = control.current.getMonth()
var d = control.current.getDate()
if(y === year && m === month && d === day){
return true
}
return false
}
return false
}
}
FluText{
text: day
opacity: {
if(month === grid.month){
return 1
}
if(control_delegate.hovered){
return 1
}
return 0.3
}
anchors.centerIn: parent
color: {
if(today){
return FluColors.White
}
if(control_delegate.pressed){
return FluTheme.dark ? FluColors.Grey100 : FluColors.Grey100
}
if(control_delegate.hovered){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
onClicked: {
control.current = new Date(year,month,day)
control.accepted()
popup.close()
}
}
background: Item {
x: grid.leftPadding
y: grid.topPadding
width: grid.availableWidth
height: grid.availableHeight
}
}
}
}
}
}
}
}
}
background: Item{
@ -112,11 +646,6 @@ Rectangle {
}
}
function showPopup() {
if(current){
container.currentDate = current
container.date = current
container.updateMouth(current)
}
var pos = control.mapToItem(null, 0, 0)
if(d.window.height>pos.y+control.height+container.height){
popup.y = control.height

View File

@ -1,433 +0,0 @@
import QtQuick
import QtQuick.Controls
import FluentUI
Item {
property int displayMode: FluCalendarViewType.Month
property var date: new Date()
property var currentDate : new Date()
property var toDay: new Date()
property int radius: 5
signal dateClicked(var date)
id:control
width: 280
height: 325
Component.onCompleted: {
updateMouth(date)
}
Component{
id:com_week
Item{
height: 40
width: 40
FluText{
text:name
anchors.centerIn: parent
}
}
}
Component{
id:com_year
Button{
id:item_control
property bool isYear: control.toDay.getFullYear() === date.getFullYear()
height: 70
width: 70
onClicked:{
control.date = date
displayMode = FluCalendarViewType.Year
updateYear(date)
}
background: Item{
Rectangle{
width: 60
height: 60
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 50
height: 50
radius: 25
visible: isYear
color: FluTheme.primaryColor
}
FluText{
text:date.getFullYear()
anchors.centerIn: parent
color: {
if(isYear){
return "#FFFFFF"
}
if(isDecade){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
Component{
id:com_month
Button{
id:item_control
property bool isYear: control.date.getFullYear() === date.getFullYear()
property bool isMonth: control.toDay.getFullYear() === date.getFullYear() && control.toDay.getMonth() === date.getMonth()
height: 70
width: 70
onClicked:{
control.date = date
displayMode = FluCalendarViewType.Month
updateMouth(date)
}
background: Item{
Rectangle{
width: 60
height: 60
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 50
height: 50
radius: 25
visible: isMonth
color: FluTheme.primaryColor
}
FluText{
text:(date.getMonth()+1)+"月"
anchors.centerIn: parent
color: {
if(isMonth){
return "#FFFFFF"
}
if(isYear){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
Component{
id:com_day
Button{
id:item_control
property bool isMonth: control.date.getMonth() === date.getMonth()
property bool isDay: control.currentDate.getFullYear() === date.getFullYear() && control.currentDate.getMonth() === date.getMonth() && control.currentDate.getDate() === date.getDate()
property bool isToDay: control.toDay.getFullYear() === date.getFullYear() && control.toDay.getMonth() === date.getMonth() && control.toDay.getDate() === date.getDate()
height: 40
width: 40
onClicked: {
currentDate = date
control.dateClicked(date)
}
background: Item{
Rectangle{
width: 36
height: 36
radius: 4
anchors.centerIn: parent
color:{
if(FluTheme.dark){
if(item_control.hovered){
return Qt.rgba(1,1,1,0.05)
}
return Qt.rgba(0,0,0,0)
}else{
if(item_control.hovered){
return Qt.rgba(0,0,0,0.05)
}
return Qt.rgba(0,0,0,0)
}
}
}
Rectangle{
id:backgound_today
anchors.centerIn: parent
width: 36
height: 36
radius: 18
color:"#00000000"
visible: isDay
border.color: FluTheme.primaryColor
border.width: 1
}
Rectangle{
id:backgound_selected
anchors.centerIn: parent
width: 30
height: 30
radius: 15
visible: isToDay
color: FluTheme.primaryColor
}
FluText{
text:date.getDate()
anchors.centerIn: parent
color: {
if(isToDay){
return "#FFFFFF"
}
if(isMonth){
return FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
}
return Qt.rgba(150/255,150/255,150/255,1)
}
}
}
contentItem: Item{}
}
}
FluArea{
anchors.fill: parent
radius: control.radius
Rectangle{
id:layout_divider
height: 1
width: parent.width
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
anchors{
top: parent.top
topMargin: 44
}
}
Item{
id:layout_top
anchors{
left: parent.left
right: parent.right
top: parent.top
bottom: layout_divider.top
}
FluTextButton{
id:title
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 14
}
disabled: displayMode === FluCalendarViewType.Decade
onClicked:{
if(displayMode === FluCalendarViewType.Month){
displayMode = FluCalendarViewType.Year
updateYear(date)
}else if(displayMode === FluCalendarViewType.Year){
displayMode = FluCalendarViewType.Decade
updateDecade(date)
}
}
}
FluIconButton{
id:icon_up
iconSource: FluentIcons.CaretUpSolid8
iconSize: 10
anchors{
verticalCenter: parent.verticalCenter
right: icon_down.left
rightMargin: 14
}
onClicked: {
var year = date.getFullYear()
var month = date.getMonth()
if(displayMode === FluCalendarViewType.Month){
var lastMonthYear = year;
var lastMonthMonth = month - 1
if (month === 0) {
lastMonthYear = year - 1
lastMonthMonth = 11
}
date = new Date(lastMonthYear,lastMonthMonth,1)
updateMouth(date)
}else if(displayMode === FluCalendarViewType.Year){
date = new Date(year-1,month,1)
updateYear(date)
}else if(displayMode === FluCalendarViewType.Decade){
date = new Date(Math.floor(year / 10) * 10-10,month,1)
updateDecade(date)
}
}
}
FluIconButton{
id:icon_down
iconSource: FluentIcons.CaretDownSolid8
iconSize: 10
anchors{
verticalCenter: parent.verticalCenter
right: parent.right
rightMargin: 8
}
onClicked: {
var year = date.getFullYear()
var month = date.getMonth()
if(displayMode === FluCalendarViewType.Month){
var nextMonthYear = year
var nextMonth = month + 1
if (month === 11) {
nextMonthYear = year + 1
nextMonth = 0
}
date = new Date(nextMonthYear,nextMonth,1)
updateMouth(date)
}else if(displayMode === FluCalendarViewType.Year){
date = new Date(year+1,month,1)
updateYear(date)
}else if(displayMode === FluCalendarViewType.Decade){
date = new Date(Math.floor(year / 10) * 10+10,month,1)
updateDecade(date)
}
}
}
}
ListModel {
id:list_model
}
Item{
id:layout_bottom
anchors{
left: parent.left
right: parent.right
top: layout_divider.bottom
bottom: parent.bottom
}
GridView{
model: list_model
anchors.fill: parent
cellHeight: displayMode === FluCalendarViewType.Month ? 40 : 70
cellWidth: displayMode === FluCalendarViewType.Month ? 40 : 70
clip: true
boundsBehavior:Flickable.StopAtBounds
delegate: FluLoader{
property var modelData : model
property var name : model.name
property var date : model.date
property var isDecade: {
return model.isDecade
}
sourceComponent: {
if(model.type === 0){
return com_week
}
if(model.type === 1){
return com_day
}
if(model.type === 2){
return com_month
}
if(model.type === 3){
return com_year
}
return com_day
}
}
}
}
}
function createItemWeek(name){
return {type:0,date:new Date(),name:name,isDecade:false}
}
function createItemDay(date){
return {type:1,date:date,name:"",isDecade:false}
}
function createItemMonth(date){
return {type:2,date:date,name:"",isDecade:false}
}
function createItemYear(date,isDecade){
return {type:3,date:date,name:"",isDecade:isDecade}
}
function updateDecade(date){
list_model.clear()
var year = date.getFullYear()
const decadeStart = Math.floor(year / 10) * 10;
for(var i = decadeStart ; i< decadeStart+10 ; i++){
list_model.append(createItemYear(new Date(i,0,1),true));
}
for(var j = decadeStart+10 ; j< decadeStart+16 ; j++){
list_model.append(createItemYear(new Date(j,0,1),false));
}
title.text = decadeStart+"-"+(decadeStart+10)
}
function updateYear(date){
list_model.clear()
var year = date.getFullYear()
for(var i = 0 ; i< 12 ; i++){
list_model.append(createItemMonth(new Date(year,i)));
}
for(var j = 0 ; j< 4 ; j++){
list_model.append(createItemMonth(new Date(year+1,j)));
}
title.text = year+"年"
}
function updateMouth(date){
list_model.clear()
list_model.append([createItemWeek("一"),createItemWeek("二"),createItemWeek("三"),createItemWeek("四"),createItemWeek("五"),createItemWeek("六"),createItemWeek("日")])
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
var firstDayOfMonth = new Date(year, month, 1)
var dayOfWeek = firstDayOfMonth.getDay()
var headerSize = (dayOfWeek===0?7:dayOfWeek)-1
if(headerSize!==0){
var lastMonthYear = year;
var lastMonthMonth = month - 1
if (month === 0) {
lastMonthYear = year - 1
lastMonthMonth = 11
}
var lastMonthDays = new Date(lastMonthYear, lastMonthMonth+1, 0).getDate()
for (var i = headerSize-1; i >= 0; i--) {
list_model.append(createItemDay(new Date(lastMonthYear, lastMonthMonth,lastMonthDays-i)))
}
}
const lastDayOfMonth = new Date(year, month+1, 0).getDate()
for (let day = 1; day <= lastDayOfMonth; day++) {
list_model.append(createItemDay(new Date(year, month,day)))
}
var footerSize = 49-list_model.count
var nextMonthYear = year
var nextMonth = month + 1
if (month === 11) {
nextMonthYear = year + 1
nextMonth = 0
}
const nextDayOfMonth = new Date(nextMonthYear, nextMonth+1, 0).getDate()
for (let j = 1; j <= footerSize; j++) {
list_model.append(createItemDay(new Date(nextMonthYear, nextMonth,j)))
}
title.text = year+"年"+(month+1)+"月"
}
}

View File

@ -8,9 +8,9 @@ FluPopup {
id: control
property string title: ""
property string message: ""
property string neutralText: "Close"
property string negativeText: "Cancel"
property string positiveText: "OK"
property string neutralText: qsTr("Close")
property string negativeText: qsTr("Cancel")
property string positiveText: qsTr("OK")
property int messageTextFormart: Text.AutoText
property int delayTime: 100
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton

View File

@ -10,11 +10,11 @@ Rectangle {
property color normalColor: FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
property bool showYear: true
property var current
property string yearText: "年"
property string monthText: "月"
property string dayText: "日"
property string cancelText: "取消"
property string okText: "确定"
property string yearText: qsTr("Year")
property string monthText: qsTr("Month")
property string dayText: qsTr("Day")
property string cancelText: qsTr("Cancel")
property string okText: qsTr("OK")
signal accepted()
id:control
color: {

View File

@ -20,6 +20,7 @@ Item {
d.flag = false
}
}
clip: true
Rectangle{
id:layout_header
width: parent.width
@ -79,10 +80,10 @@ Item {
topMargin: -1
left: layout_header.left
}
clip: true
visible: contentHeight+container.anchors.topMargin !== 0
height: contentHeight+container.anchors.topMargin
width: parent.width
z:-999
Rectangle{
id:container
anchors.fill: parent

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import FluentUI
Image {
property string errorButtonText: "重新加载"
property string errorButtonText: qsTr("Reload")
property var clickErrorListener : function(){
image.source = ""
image.source = control.source

View File

@ -5,8 +5,8 @@ import FluentUI
Item {
signal requestPage(int page,int count)
property string previousText: "<上一页"
property string nextText: "下一页>"
property string previousText: qsTr("<Previous")
property string nextText: qsTr("Next>")
property int pageCurrent: 0
property int itemCount: 0
property int pageButtonCount: 5

View File

@ -5,11 +5,11 @@ import FluentUI
FluIconButton {
id:control
property var current : ["Ctrl","Shift","A"]
property string title: "激活快捷键"
property string message: "按下组合键以更改此快捷键"
property string positiveText: "保存"
property string neutralText: "取消"
property string negativeText: "重置"
property string title: qsTr("Activate the Shortcut")
property string message: qsTr("Press the key combination to change the shortcut")
property string positiveText: qsTr("Save")
property string neutralText: qsTr("Cancel")
property string negativeText: qsTr("Reset")
signal accepted()
QtObject{
id: d

View File

@ -3,10 +3,10 @@ import QtQuick.Controls
import FluentUI
FluMenu{
property string cutText : "剪切"
property string copyText : "复制"
property string pasteText : "粘贴"
property string selectAllText : "全选"
property string cutText : qsTr("Cut")
property string copyText : qsTr("Copy")
property string pasteText : qsTr("Paste")
property string selectAllText : qsTr("Select All")
property var inputItem
id:menu
enableAnimation: false

View File

@ -10,9 +10,9 @@ Popup{
property Component nextButton: com_next_button
property Component prevButton: com_prev_button
property int index : 0
property string finishText: "结束导览"
property string nextText: "下一步"
property string previousText: "上一步"
property string finishText: qsTr("Finish")
property string nextText: qsTr("Next")
property string previousText: qsTr("Previous")
id:control
padding: 0
parent: Overlay.overlay

View File

@ -236,13 +236,13 @@ Window {
clip: true
}
FluLoader{
property string loadingText: "加载中..."
property string loadingText
property bool cancel: false
id:loader_loading
anchors.fill: parent
}
FluInfoBar{
id:infoBar
id:info_bar
root: window
}
FluWindowLifecycle{
@ -267,7 +267,7 @@ Window {
function destoryOnClose(){
lifecycle.onDestoryOnClose()
}
function showLoading(text = "加载中...",cancel = true){
function showLoading(text = qsTr("Loading..."),cancel = true){
loader_loading.loadingText = text
loader_loading.cancel = cancel
loader_loading.sourceComponent = com_loading
@ -276,21 +276,21 @@ Window {
loader_loading.sourceComponent = undefined
}
function showSuccess(text,duration,moremsg){
infoBar.showSuccess(text,duration,moremsg)
info_bar.showSuccess(text,duration,moremsg)
}
function showInfo(text,duration,moremsg){
infoBar.showInfo(text,duration,moremsg)
info_bar.showInfo(text,duration,moremsg)
}
function showWarning(text,duration,moremsg){
infoBar.showWarning(text,duration,moremsg)
info_bar.showWarning(text,duration,moremsg)
}
function showError(text,duration,moremsg){
infoBar.showError(text,duration,moremsg)
info_bar.showError(text,duration,moremsg)
}
function moveWindowToDesktopCenter(){
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
var taskBarHeight = FluTools.getTaskBarHeight(window)
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height-taskBarHeight)/2+Screen.virtualY,window.width,window.height)
var availableGeometry = FluTools.desktopAvailableGeometry(window)
window.setGeometry((availableGeometry.width-window.width)/2+Screen.virtualX,(availableGeometry.height-window.height)/2+Screen.virtualY,window.width,window.height)
}
function fixWindowSize(){
if(fixSize){

View File

@ -0,0 +1,33 @@
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI
FluWindow {
id:control
property Component contentDelegate
autoVisible: false
autoCenter: false
autoDestory: true
fixSize: true
Loader{
anchors.fill: parent
sourceComponent: {
if(control.autoDestory){
return control.visible ? control.contentDelegate : undefined
}
return control.contentDelegate
}
}
closeListener: function(event){
visible = false
event.accepted = false
}
function showDialog(){
var x = transientParent.x + (transientParent.width - width)/2
var y = transientParent.y + (transientParent.height - height)/2
setGeometry(x,y,width,height)
visible = true
}
}

241
src/fluentuiplugin_en_US.ts Normal file
View File

@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_US">
<context>
<name>FluAppBar</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="9"/>
<source>Dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="10"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="10"/>
<source>Light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="11"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="12"/>
<source>Restore</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="13"/>
<source>Maximize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="14"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="15"/>
<source>Sticky on Top</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="16"/>
<source>Sticky on Top cancelled</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluAutoSuggestBox</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAutoSuggestBox.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAutoSuggestBox.qml" line="7"/>
<source>No results found</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluCalendarPicker</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml" line="11"/>
<source>Pick a date</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluContentDialog</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="11"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="12"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="13"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluDatePicker</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<source>Year</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<source>Month</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
<source>Day</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="16"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="17"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="17"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluImage</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluImage.qml" line="6"/>
<location filename="Qt6/imports/FluentUI/Controls/FluImage.qml" line="6"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluPagination</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluPagination.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluPagination.qml" line="8"/>
<source>&lt;Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluPagination.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluPagination.qml" line="9"/>
<source>Next&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluShortcutPicker</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="8"/>
<source>Activate the Shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="9"/>
<source>Press the key combination to change the shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="10"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="10"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="11"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="12"/>
<source>Reset</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluTextBoxMenu</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="6"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="6"/>
<source>Cut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="7"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="7"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="8"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="9"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluTour</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="13"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="14"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="15"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluWindow</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="271"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="270"/>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

245
src/fluentuiplugin_zh_CN.ts Normal file
View File

@ -0,0 +1,245 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>FluAppBar</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="9"/>
<source>Dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="10"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="10"/>
<source>Light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="11"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="12"/>
<source>Restore</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="13"/>
<source>Maximize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="14"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="15"/>
<source>Sticky on Top</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAppBar.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAppBar.qml" line="16"/>
<source>Sticky on Top cancelled</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluAutoSuggestBox</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluAutoSuggestBox.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluAutoSuggestBox.qml" line="7"/>
<source>No results found</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluCalendarPicker</name>
<message>
<source>Please select a date</source>
<translation type="obsolete"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluCalendarPicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluCalendarPicker.qml" line="11"/>
<source>Pick a date</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluContentDialog</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="11"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="12"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluContentDialog.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluContentDialog.qml" line="13"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluDatePicker</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="13"/>
<source>Year</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="14"/>
<source>Month</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="15"/>
<source>Day</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="16"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="16"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluDatePicker.qml" line="17"/>
<location filename="Qt6/imports/FluentUI/Controls/FluDatePicker.qml" line="17"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluImage</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluImage.qml" line="6"/>
<location filename="Qt6/imports/FluentUI/Controls/FluImage.qml" line="6"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluPagination</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluPagination.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluPagination.qml" line="8"/>
<source>&lt;Previous</source>
<translation type="unfinished">&lt;</translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluPagination.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluPagination.qml" line="9"/>
<source>Next&gt;</source>
<translation type="unfinished">&gt;</translation>
</message>
</context>
<context>
<name>FluShortcutPicker</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="8"/>
<source>Activate the Shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="9"/>
<source>Press the key combination to change the shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="10"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="10"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="11"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="11"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml" line="12"/>
<location filename="Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml" line="12"/>
<source>Reset</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluTextBoxMenu</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="6"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="6"/>
<source>Cut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="7"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="7"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="8"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="8"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="9"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTextBoxMenu.qml" line="9"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluTour</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="13"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="13"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="14"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="14"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluTour.qml" line="15"/>
<location filename="Qt6/imports/FluentUI/Controls/FluTour.qml" line="15"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FluWindow</name>
<message>
<location filename="Qt5/imports/FluentUI/Controls/FluWindow.qml" line="271"/>
<location filename="Qt6/imports/FluentUI/Controls/FluWindow.qml" line="270"/>
<source>Loading...</source>
<translation type="unfinished">...</translation>
</message>
</context>
</TS>