From a27e5db0328783dc0c8c173be529055b8823fcf1 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Sat, 22 Apr 2023 16:02:52 +0800 Subject: [PATCH] update --- example/App.qml | 26 ------ example/CMakeLists.txt | 28 +++--- example/example.pro | 28 +++--- example/qml.qrc | 92 +++++++++---------- example/qml/App.qml | 26 ++++++ example/{ => qml}/component/CodeExpander.qml | 0 example/{ => qml}/global/ItemsFooter.qml | 2 +- example/{ => qml}/global/ItemsOriginal.qml | 62 ++++++------- example/{ => qml}/global/MainEvent.qml | 0 example/{ => qml}/global/qmldir | 0 example/{ => qml/page}/T_Awesome.qml | 0 example/{ => qml/page}/T_Badge.qml | 2 +- example/{ => qml/page}/T_Buttons.qml | 2 +- example/{ => qml/page}/T_CalendarPicker.qml | 2 +- example/{ => qml/page}/T_Carousel.qml | 2 +- example/{ => qml/page}/T_CheckBox.qml | 2 +- example/{ => qml/page}/T_ColorPicker.qml | 2 +- example/{ => qml/page}/T_DatePicker.qml | 2 +- example/{ => qml/page}/T_Dialog.qml | 2 +- example/{ => qml/page}/T_Expander.qml | 2 +- example/{ => qml/page}/T_FlipView.qml | 2 +- example/{ => qml/page}/T_Home.qml | 2 +- example/{ => qml/page}/T_InfoBar.qml | 2 +- example/{ => qml/page}/T_MediaPlayer.qml | 2 +- example/{ => qml/page}/T_Menu.qml | 2 +- example/{ => qml/page}/T_MultiWindow.qml | 6 +- example/{ => qml/page}/T_Pivot.qml | 2 +- example/{ => qml/page}/T_Progress.qml | 2 +- example/{ => qml/page}/T_RatingControl.qml | 2 +- example/{ => qml/page}/T_Rectangle.qml | 2 +- example/{ => qml/page}/T_Settings.qml | 4 +- example/{ => qml/page}/T_Slider.qml | 2 +- example/{ => qml/page}/T_StatusView.qml | 2 +- example/{ => qml/page}/T_TabView.qml | 2 +- example/{ => qml/page}/T_TableView.qml | 2 +- example/{ => qml/page}/T_TextBox.qml | 2 +- example/{ => qml/page}/T_Theme.qml | 2 +- example/{ => qml/page}/T_TimePicker.qml | 2 +- example/{ => qml/page}/T_ToggleSwitch.qml | 2 +- example/{ => qml/page}/T_Tooltip.qml | 2 +- example/{ => qml/page}/T_TreeView.qml | 2 +- example/{ => qml/page}/T_Typography.qml | 0 .../window/AboutWindow.qml} | 0 .../window/ChatWindow.qml} | 0 .../window/LoginWindow.qml} | 0 .../window/MainWindow.qml} | 2 +- .../window/MediaWindow.qml} | 0 .../window}/SingleInstanceWindow.qml | 0 .../{page => qml/window}/SingleTaskWindow.qml | 0 .../{page => qml/window}/StandardWindow.qml | 0 example/{ => src}/AppInfo.cpp | 1 - example/{ => src}/AppInfo.h | 0 .../{ => src/controller}/ChatController.cpp | 0 example/{ => src/controller}/ChatController.h | 2 +- example/{ => src}/lang/En.cpp | 0 example/{ => src}/lang/En.h | 0 example/{ => src}/lang/Lang.cpp | 0 example/{ => src}/lang/Lang.h | 0 example/{ => src}/lang/Zh.cpp | 0 example/{ => src}/lang/Zh.h | 0 example/{ => src}/main.cpp | 6 +- example/{ => src}/stdafx.h | 0 example/{ => src/tool}/IPC.cpp | 0 example/{ => src/tool}/IPC.h | 0 src/controls/FluIconButton.qml | 1 - src/controls/FluNavigationView.qml | 3 +- src/controls/FluTextBoxBackground.qml | 4 +- src/controls/FluWindow.qml | 2 +- 68 files changed, 176 insertions(+), 175 deletions(-) delete mode 100644 example/App.qml create mode 100644 example/qml/App.qml rename example/{ => qml}/component/CodeExpander.qml (100%) rename example/{ => qml}/global/ItemsFooter.qml (86%) rename example/{ => qml}/global/ItemsOriginal.qml (77%) rename example/{ => qml}/global/MainEvent.qml (100%) rename example/{ => qml}/global/qmldir (100%) rename example/{ => qml/page}/T_Awesome.qml (100%) rename example/{ => qml/page}/T_Badge.qml (99%) rename example/{ => qml/page}/T_Buttons.qml (99%) rename example/{ => qml/page}/T_CalendarPicker.qml (97%) rename example/{ => qml/page}/T_Carousel.qml (98%) rename example/{ => qml/page}/T_CheckBox.qml (96%) rename example/{ => qml/page}/T_ColorPicker.qml (98%) rename example/{ => qml/page}/T_DatePicker.qml (98%) rename example/{ => qml/page}/T_Dialog.qml (99%) rename example/{ => qml/page}/T_Expander.qml (99%) rename example/{ => qml/page}/T_FlipView.qml (99%) rename example/{ => qml/page}/T_Home.qml (99%) rename example/{ => qml/page}/T_InfoBar.qml (98%) rename example/{ => qml/page}/T_MediaPlayer.qml (98%) rename example/{ => qml/page}/T_Menu.qml (98%) rename example/{ => qml/page}/T_MultiWindow.qml (96%) rename example/{ => qml/page}/T_Pivot.qml (98%) rename example/{ => qml/page}/T_Progress.qml (98%) rename example/{ => qml/page}/T_RatingControl.qml (96%) rename example/{ => qml/page}/T_Rectangle.qml (99%) rename example/{ => qml/page}/T_Settings.qml (98%) rename example/{ => qml/page}/T_Slider.qml (97%) rename example/{ => qml/page}/T_StatusView.qml (99%) rename example/{ => qml/page}/T_TabView.qml (99%) rename example/{ => qml/page}/T_TableView.qml (99%) rename example/{ => qml/page}/T_TextBox.qml (99%) rename example/{ => qml/page}/T_Theme.qml (99%) rename example/{ => qml/page}/T_TimePicker.qml (98%) rename example/{ => qml/page}/T_ToggleSwitch.qml (96%) rename example/{ => qml/page}/T_Tooltip.qml (99%) rename example/{ => qml/page}/T_TreeView.qml (99%) rename example/{ => qml/page}/T_Typography.qml (100%) rename example/{page/AboutPage.qml => qml/window/AboutWindow.qml} (100%) rename example/{page/ChatPage.qml => qml/window/ChatWindow.qml} (100%) rename example/{page/LoginPage.qml => qml/window/LoginWindow.qml} (100%) rename example/{page/MainPage.qml => qml/window/MainWindow.qml} (98%) rename example/{page/MediaPage.qml => qml/window/MediaWindow.qml} (100%) rename example/{page => qml/window}/SingleInstanceWindow.qml (100%) rename example/{page => qml/window}/SingleTaskWindow.qml (100%) rename example/{page => qml/window}/StandardWindow.qml (100%) rename example/{ => src}/AppInfo.cpp (99%) rename example/{ => src}/AppInfo.h (100%) rename example/{ => src/controller}/ChatController.cpp (100%) rename example/{ => src/controller}/ChatController.h (97%) rename example/{ => src}/lang/En.cpp (100%) rename example/{ => src}/lang/En.h (100%) rename example/{ => src}/lang/Lang.cpp (100%) rename example/{ => src}/lang/Lang.h (100%) rename example/{ => src}/lang/Zh.cpp (100%) rename example/{ => src}/lang/Zh.h (100%) rename example/{ => src}/main.cpp (94%) rename example/{ => src}/stdafx.h (100%) rename example/{ => src/tool}/IPC.cpp (100%) rename example/{ => src/tool}/IPC.h (100%) diff --git a/example/App.qml b/example/App.qml deleted file mode 100644 index 36f451f7..00000000 --- a/example/App.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI - -Window { - id:app - Component.onCompleted: { - FluApp.init(app) - FluTheme.frameless = ("windows" === Qt.platform.os) - FluTheme.darkMode = FluDarkMode.System - FluApp.routes = { - "/":"qrc:/page/MainPage.qml", - "/about":"qrc:/page/AboutPage.qml", - "/login":"qrc:/page/LoginPage.qml", - "/chat":"qrc:/page/ChatPage.qml", - "/media":"qrc:/page/MediaPage.qml", - "/singleTaskWindow":"qrc:/page/SingleTaskWindow.qml", - "/standardWindow":"qrc:/page/StandardWindow.qml", - "/singleInstanceWindow":"qrc:/page/SingleInstanceWindow.qml" - } - FluApp.initialRoute = "/" - FluApp.run() - } -} diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 467dbf17..46fba119 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -24,23 +24,23 @@ endif() find_package(Qt6 COMPONENTS Core Quick QuickControls2 Concurrent Network Multimedia REQUIRED) set(SOURCES - ChatController.cpp - AppInfo.cpp - main.cpp - lang/Lang.cpp - lang/Zh.cpp - lang/En.cpp - IPC.cpp + src/controller/ChatController.cpp + src/AppInfo.cpp + src/main.cpp + src/lang/Lang.cpp + src/lang/Zh.cpp + src/lang/En.cpp + src/tool/IPC.cpp ) set(HEADERS - ChatController.h - AppInfo.h - stdafx.h - lang/Lang.h - lang/Zh.h - lang/En.h - IPC.h + src/controller/ChatController.h + src/AppInfo.h + src/stdafx.h + src/lang/Lang.h + src/lang/Zh.h + src/lang/En.h + src/tool/IPC.h ) set(RESOURCES diff --git a/example/example.pro b/example/example.pro index d00dd62b..f1942bcd 100644 --- a/example/example.pro +++ b/example/example.pro @@ -3,22 +3,22 @@ CONFIG += c++17 DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT HEADERS += \ - lang/En.h \ - lang/Lang.h \ - lang/Zh.h \ - stdafx.h \ - ChatController.h \ - AppInfo.h \ - IPC.h + src/lang/En.h \ + src/lang/Lang.h \ + src/lang/Zh.h \ + src/stdafx.h \ + src/controller/ChatController.h \ + src/AppInfo.h \ + src/tool/IPC.h SOURCES += \ - ChatController.cpp \ - AppInfo.cpp \ - lang/En.cpp \ - lang/Lang.cpp \ - lang/Zh.cpp \ - main.cpp \ - IPC.cpp + src/controller/ChatController.cpp \ + src/AppInfo.cpp \ + src/lang/En.cpp \ + src/lang/Lang.cpp \ + src/lang/Zh.cpp \ + src/main.cpp \ + src/tool/IPC.cpp RESOURCES += qml.qrc diff --git a/example/qml.qrc b/example/qml.qrc index bc44825e..9d268a8a 100644 --- a/example/qml.qrc +++ b/example/qml.qrc @@ -1,6 +1,5 @@ - App.qml res/image/image_huoyin.webp res/svg/avatar_1.svg res/svg/avatar_2.svg @@ -14,40 +13,11 @@ res/svg/avatar_10.svg res/svg/avatar_11.svg res/svg/avatar_12.svg - page/AboutPage.qml - page/MainPage.qml - page/LoginPage.qml - T_ToggleSwitch.qml - T_Typography.qml - T_Awesome.qml - T_Buttons.qml - T_Rectangle.qml - T_InfoBar.qml - T_Progress.qml - T_Slider.qml - T_TextBox.qml - T_Theme.qml - T_Dialog.qml - T_TreeView.qml - T_Expander.qml - T_TimePicker.qml - T_DatePicker.qml - T_MultiWindow.qml - T_Menu.qml res/image/banner_1.jpg res/image/banner_2.jpg res/image/banner_3.jpg res/image/logo_openai.png - page/ChatPage.qml - T_Tooltip.qml - T_Badge.qml - T_CalendarPicker.qml - T_ColorPicker.qml - T_Carousel.qml - T_MediaPlayer.qml - T_TabView.qml res/image/favicon.ico - T_Home.qml res/image/bg_home_header.png res/image/ic_home_github.png res/image/control/Acrylic.png @@ -148,25 +118,55 @@ res/image/control/Viewbox.png res/image/control/WebView.png res/image/control/XamlUICommand.png - T_CheckBox.qml - global/ItemsOriginal.qml - global/qmldir - global/ItemsFooter.qml - page/MediaPage.qml - T_FlipView.qml - T_Pivot.qml - component/CodeExpander.qml - T_TableView.qml - T_StatusView.qml - T_Settings.qml - global/MainEvent.qml res/svg/home.svg res/svg/home_dark.svg - page/StandardWindow.qml - page/SingleTaskWindow.qml - page/SingleInstanceWindow.qml - T_RatingControl.qml res/image/qrcode_wx.jpg res/image/qrcode_zfb.jpg + qml/component/CodeExpander.qml + qml/global/ItemsFooter.qml + qml/global/ItemsOriginal.qml + qml/global/MainEvent.qml + qml/global/qmldir + qml/App.qml + qml/window/AboutWindow.qml + qml/window/ChatWindow.qml + qml/window/LoginWindow.qml + qml/window/MainWindow.qml + qml/window/MediaWindow.qml + qml/window/SingleInstanceWindow.qml + qml/window/SingleTaskWindow.qml + qml/window/StandardWindow.qml + qml/page/T_Awesome.qml + qml/page/T_Badge.qml + qml/page/T_Buttons.qml + qml/page/T_CalendarPicker.qml + qml/page/T_Carousel.qml + qml/page/T_CheckBox.qml + qml/page/T_ColorPicker.qml + qml/page/T_DatePicker.qml + qml/page/T_Dialog.qml + qml/page/T_Expander.qml + qml/page/T_FlipView.qml + qml/page/T_Home.qml + qml/page/T_InfoBar.qml + qml/page/T_MediaPlayer.qml + qml/page/T_Menu.qml + qml/page/T_MultiWindow.qml + qml/page/T_Pivot.qml + qml/page/T_Progress.qml + qml/page/T_RatingControl.qml + qml/page/T_Rectangle.qml + qml/page/T_Settings.qml + qml/page/T_Slider.qml + qml/page/T_StatusView.qml + qml/page/T_TableView.qml + qml/page/T_TabView.qml + qml/page/T_TextBox.qml + qml/page/T_Theme.qml + qml/page/T_TimePicker.qml + qml/page/T_ToggleSwitch.qml + qml/page/T_Tooltip.qml + qml/page/T_TreeView.qml + qml/page/T_Typography.qml diff --git a/example/qml/App.qml b/example/qml/App.qml new file mode 100644 index 00000000..9635c77c --- /dev/null +++ b/example/qml/App.qml @@ -0,0 +1,26 @@ +import QtQuick +import QtQuick.Window +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI + +Window { + id:app + Component.onCompleted: { + FluApp.init(app) + FluTheme.frameless = ("windows" === Qt.platform.os) + FluTheme.darkMode = FluDarkMode.System + FluApp.routes = { + "/":"qrc:/qml/window/MainWindow.qml", + "/about":"qrc:/qml/window/AboutWindow.qml", + "/login":"qrc:/qml/window/LoginWindow.qml", + "/chat":"qrc:/qml/window/ChatWindow.qml", + "/media":"qrc:/qml/window/MediaWindow.qml", + "/singleTaskWindow":"qrc:/qml/window/SingleTaskWindow.qml", + "/standardWindow":"qrc:/qml/window/StandardWindow.qml", + "/singleInstanceWindow":"qrc:/qml/window/SingleInstanceWindow.qml" + } + FluApp.initialRoute = "/" + FluApp.run() + } +} diff --git a/example/component/CodeExpander.qml b/example/qml/component/CodeExpander.qml similarity index 100% rename from example/component/CodeExpander.qml rename to example/qml/component/CodeExpander.qml diff --git a/example/global/ItemsFooter.qml b/example/qml/global/ItemsFooter.qml similarity index 86% rename from example/global/ItemsFooter.qml rename to example/qml/global/ItemsFooter.qml index 5f34ffa9..0db36fbc 100644 --- a/example/global/ItemsFooter.qml +++ b/example/qml/global/ItemsFooter.qml @@ -20,7 +20,7 @@ FluObject{ title:lang.settings icon:FluentIcons.Settings onTap:{ - navigationView.push("qrc:/T_Settings.qml") + navigationView.push("qrc:/qml/page/T_Settings.qml") } } } diff --git a/example/global/ItemsOriginal.qml b/example/qml/global/ItemsOriginal.qml similarity index 77% rename from example/global/ItemsOriginal.qml rename to example/qml/global/ItemsOriginal.qml index 268bfcf7..ac0c018b 100644 --- a/example/global/ItemsOriginal.qml +++ b/example/qml/global/ItemsOriginal.qml @@ -18,7 +18,7 @@ FluObject{ height: 18 } onTap:{ - navigationView.push("qrc:/T_Home.qml") + navigationView.push("qrc:/qml/page/T_Home.qml") } } @@ -31,7 +31,7 @@ FluObject{ recentlyUpdated:true desc:"A control that responds to user input and raisesa Click event." onTap:{ - navigationView.push("qrc:/T_Buttons.qml") + navigationView.push("qrc:/qml/page/T_Buttons.qml") } } FluPaneItem{ @@ -40,7 +40,7 @@ FluObject{ recentlyUpdated:true desc:"A control that lets the user select from a rangeof values by moving a Thumb control along atrack." onTap:{ - navigationView.push("qrc:/T_Slider.qml") + navigationView.push("qrc:/qml/page/T_Slider.qml") } } FluPaneItem{ @@ -49,13 +49,13 @@ FluObject{ recentlyUpdated:true desc:"A control that a user can select or clear." onTap:{ - navigationView.push("qrc:/T_CheckBox.qml") + navigationView.push("qrc:/qml/page/T_CheckBox.qml") } } FluPaneItem{ title:"ToggleSwitch" onTap:{ - navigationView.push("qrc:/T_ToggleSwitch.qml") + navigationView.push("qrc:/qml/page/T_ToggleSwitch.qml") } } } @@ -66,31 +66,31 @@ FluObject{ FluPaneItem{ title:"TextBox" onTap:{ - navigationView.push("qrc:/T_TextBox.qml") + navigationView.push("qrc:/qml/page/T_TextBox.qml") } } FluPaneItem{ title:"TimePicker" onTap:{ - navigationView.push("qrc:/T_TimePicker.qml") + navigationView.push("qrc:/qml/page/T_TimePicker.qml") } } FluPaneItem{ title:"DatePicker" onTap:{ - navigationView.push("qrc:/T_DatePicker.qml") + navigationView.push("qrc:/qml/page/T_DatePicker.qml") } } FluPaneItem{ title:"CalendarPicker" onTap:{ - navigationView.push("qrc:/T_CalendarPicker.qml") + navigationView.push("qrc:/qml/page/T_CalendarPicker.qml") } } FluPaneItem{ title:"ColorPicker" onTap:{ - navigationView.push("qrc:/T_ColorPicker.qml") + navigationView.push("qrc:/qml/page/T_ColorPicker.qml") } } } @@ -104,49 +104,49 @@ FluObject{ recentlyUpdated:true desc:"An inline message to display app-wide statuschange information." onTap:{ - navigationView.push("qrc:/T_InfoBar.qml") + navigationView.push("qrc:/qml/page/T_InfoBar.qml") } } FluPaneItem{ title:"Progress" onTap:{ - navigationView.push("qrc:/T_Progress.qml") + navigationView.push("qrc:/qml/page/T_Progress.qml") } } FluPaneItem{ title:"RatingControl" onTap:{ - navigationView.push("qrc:/T_RatingControl.qml") + navigationView.push("qrc:/qml/page/T_RatingControl.qml") } } FluPaneItem{ title:"Badge" onTap:{ - navigationView.push("qrc:/T_Badge.qml") + navigationView.push("qrc:/qml/page/T_Badge.qml") } } FluPaneItem{ title:"Rectangle" onTap:{ - navigationView.push("qrc:/T_Rectangle.qml") + navigationView.push("qrc:/qml/page/T_Rectangle.qml") } } FluPaneItem{ title:"StatusView" onTap:{ - navigationView.push("qrc:/T_StatusView.qml") + navigationView.push("qrc:/qml/page/T_StatusView.qml") } } FluPaneItem{ title:"Carousel" onTap:{ - navigationView.push("qrc:/T_Carousel.qml") + navigationView.push("qrc:/qml/page/T_Carousel.qml") } } FluPaneItem{ title:"Expander" onTap:{ - navigationView.push("qrc:/T_Expander.qml") + navigationView.push("qrc:/qml/page/T_Expander.qml") } } } @@ -157,19 +157,19 @@ FluObject{ FluPaneItem{ title:"Dialog" onTap:{ - navigationView.push("qrc:/T_Dialog.qml") + navigationView.push("qrc:/qml/page/T_Dialog.qml") } } FluPaneItem{ title:"Tooltip" onTap:{ - navigationView.push("qrc:/T_Tooltip.qml") + navigationView.push("qrc:/qml/page/T_Tooltip.qml") } } FluPaneItem{ title:"Menu" onTap:{ - navigationView.push("qrc:/T_Menu.qml") + navigationView.push("qrc:/qml/page/T_Menu.qml") } } } @@ -184,7 +184,7 @@ FluObject{ order:3 desc:"Presents information from different sources in atabbed view." onTap:{ - navigationView.push("qrc:/T_Pivot.qml") + navigationView.push("qrc:/qml/page/T_Pivot.qml") } } FluPaneItem{ @@ -194,13 +194,13 @@ FluObject{ order:1 desc:"A control that displays a collection of tabs thatcan be used to display several documents." onTap:{ - navigationView.push("qrc:/T_TabView.qml") + navigationView.push("qrc:/qml/page/T_TabView.qml") } } FluPaneItem{ title:"TreeView" onTap:{ - navigationView.push("qrc:/T_TreeView.qml") + navigationView.push("qrc:/qml/page/T_TreeView.qml") } } FluPaneItem{ @@ -210,13 +210,13 @@ FluObject{ order:4 desc:"The TableView control provides a flexible way to display a collection of data in rows and columns" onTap:{ - navigationView.push("qrc:/T_TableView.qml") + navigationView.push("qrc:/qml/page/T_TableView.qml") } } FluPaneItem{ title:"MultiWindow" onTap:{ - navigationView.push("qrc:/T_MultiWindow.qml") + navigationView.push("qrc:/qml/page/T_MultiWindow.qml") } } FluPaneItem{ @@ -226,7 +226,7 @@ FluObject{ order:2 desc:"Presents a collection of items that the user canflip through, one item at a time." onTap:{ - navigationView.push("qrc:/T_FlipView.qml") + navigationView.push("qrc:/qml/page/T_FlipView.qml") } } } @@ -237,19 +237,19 @@ FluObject{ FluPaneItem{ title:"Theme" onTap:{ - navigationView.push("qrc:/T_Theme.qml") + navigationView.push("qrc:/qml/page/T_Theme.qml") } } FluPaneItem{ title:"Typography" onTap:{ - navigationView.push("qrc:/T_Typography.qml") + navigationView.push("qrc:/qml/page/T_Typography.qml") } } FluPaneItem{ title:"Awesome" onTap:{ - navigationView.push("qrc:/T_Awesome.qml") + navigationView.push("qrc:/qml/page/T_Awesome.qml") } } } @@ -264,7 +264,7 @@ FluObject{ order:0 desc:"A control to display video and image content." onTap:{ - navigationView.push("qrc:/T_MediaPlayer.qml") + navigationView.push("qrc:/qml/page/T_MediaPlayer.qml") } } } diff --git a/example/global/MainEvent.qml b/example/qml/global/MainEvent.qml similarity index 100% rename from example/global/MainEvent.qml rename to example/qml/global/MainEvent.qml diff --git a/example/global/qmldir b/example/qml/global/qmldir similarity index 100% rename from example/global/qmldir rename to example/qml/global/qmldir diff --git a/example/T_Awesome.qml b/example/qml/page/T_Awesome.qml similarity index 100% rename from example/T_Awesome.qml rename to example/qml/page/T_Awesome.qml diff --git a/example/T_Badge.qml b/example/qml/page/T_Badge.qml similarity index 99% rename from example/T_Badge.qml rename to example/qml/page/T_Badge.qml index dcac5553..6ca78562 100644 --- a/example/T_Badge.qml +++ b/example/qml/page/T_Badge.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Buttons.qml b/example/qml/page/T_Buttons.qml similarity index 99% rename from example/T_Buttons.qml rename to example/qml/page/T_Buttons.qml index 751dee29..64299d74 100644 --- a/example/T_Buttons.qml +++ b/example/qml/page/T_Buttons.qml @@ -4,7 +4,7 @@ import QtQuick.Window import QtQuick.Controls import QtQuick.Controls.Basic import FluentUI -import "./component" +import "../component" FluScrollablePage{ title:"Buttons" diff --git a/example/T_CalendarPicker.qml b/example/qml/page/T_CalendarPicker.qml similarity index 97% rename from example/T_CalendarPicker.qml rename to example/qml/page/T_CalendarPicker.qml index ca516259..11e4c23b 100644 --- a/example/T_CalendarPicker.qml +++ b/example/qml/page/T_CalendarPicker.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Carousel.qml b/example/qml/page/T_Carousel.qml similarity index 98% rename from example/T_Carousel.qml rename to example/qml/page/T_Carousel.qml index 0bd7c53d..64d10736 100644 --- a/example/T_Carousel.qml +++ b/example/qml/page/T_Carousel.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_CheckBox.qml b/example/qml/page/T_CheckBox.qml similarity index 96% rename from example/T_CheckBox.qml rename to example/qml/page/T_CheckBox.qml index b9aa3343..7e2fd6af 100644 --- a/example/T_CheckBox.qml +++ b/example/qml/page/T_CheckBox.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_ColorPicker.qml b/example/qml/page/T_ColorPicker.qml similarity index 98% rename from example/T_ColorPicker.qml rename to example/qml/page/T_ColorPicker.qml index 7595d1f5..2df0c535 100644 --- a/example/T_ColorPicker.qml +++ b/example/qml/page/T_ColorPicker.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_DatePicker.qml b/example/qml/page/T_DatePicker.qml similarity index 98% rename from example/T_DatePicker.qml rename to example/qml/page/T_DatePicker.qml index bf557b83..e54fb0c8 100644 --- a/example/T_DatePicker.qml +++ b/example/qml/page/T_DatePicker.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Dialog.qml b/example/qml/page/T_Dialog.qml similarity index 99% rename from example/T_Dialog.qml rename to example/qml/page/T_Dialog.qml index 6665f974..ea9b2f67 100644 --- a/example/T_Dialog.qml +++ b/example/qml/page/T_Dialog.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Expander.qml b/example/qml/page/T_Expander.qml similarity index 99% rename from example/T_Expander.qml rename to example/qml/page/T_Expander.qml index 3bfed3c4..7e1245ed 100644 --- a/example/T_Expander.qml +++ b/example/qml/page/T_Expander.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_FlipView.qml b/example/qml/page/T_FlipView.qml similarity index 99% rename from example/T_FlipView.qml rename to example/qml/page/T_FlipView.qml index 2577407d..eb0890cf 100644 --- a/example/T_FlipView.qml +++ b/example/qml/page/T_FlipView.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Home.qml b/example/qml/page/T_Home.qml similarity index 99% rename from example/T_Home.qml rename to example/qml/page/T_Home.qml index af0cd729..11ca4a51 100644 --- a/example/T_Home.qml +++ b/example/qml/page/T_Home.qml @@ -2,7 +2,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls -import "qrc:///global/" +import "qrc:///qml/global/" import FluentUI FluScrollablePage{ diff --git a/example/T_InfoBar.qml b/example/qml/page/T_InfoBar.qml similarity index 98% rename from example/T_InfoBar.qml rename to example/qml/page/T_InfoBar.qml index 15c138e5..c66d25ce 100644 --- a/example/T_InfoBar.qml +++ b/example/qml/page/T_InfoBar.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_MediaPlayer.qml b/example/qml/page/T_MediaPlayer.qml similarity index 98% rename from example/T_MediaPlayer.qml rename to example/qml/page/T_MediaPlayer.qml index 090686d0..12da086c 100644 --- a/example/T_MediaPlayer.qml +++ b/example/qml/page/T_MediaPlayer.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Menu.qml b/example/qml/page/T_Menu.qml similarity index 98% rename from example/T_Menu.qml rename to example/qml/page/T_Menu.qml index d7621ebf..01bef380 100644 --- a/example/T_Menu.qml +++ b/example/qml/page/T_Menu.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_MultiWindow.qml b/example/qml/page/T_MultiWindow.qml similarity index 96% rename from example/T_MultiWindow.qml rename to example/qml/page/T_MultiWindow.qml index 2641f70b..b107b560 100644 --- a/example/T_MultiWindow.qml +++ b/example/qml/page/T_MultiWindow.qml @@ -3,12 +3,12 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ property string password: "" - property var loginPageRegister: registerForPageResult("/login") + property var loginPageRegister: registerForWindowResult("/login") title:"MultiWindow" leftPadding:10 @@ -168,7 +168,7 @@ FluScrollablePage{ CodeExpander{ Layout.fillWidth: true Layout.topMargin: -1 - code:'property var loginPageRegister: registerForPageResult("/login") + code:'property var loginPageRegister: registerForWindowResult("/login") Connections{ target: loginPageRegister diff --git a/example/T_Pivot.qml b/example/qml/page/T_Pivot.qml similarity index 98% rename from example/T_Pivot.qml rename to example/qml/page/T_Pivot.qml index 6d3432d1..24838c1c 100644 --- a/example/T_Pivot.qml +++ b/example/qml/page/T_Pivot.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Progress.qml b/example/qml/page/T_Progress.qml similarity index 98% rename from example/T_Progress.qml rename to example/qml/page/T_Progress.qml index 642e4eed..dc6954ff 100644 --- a/example/T_Progress.qml +++ b/example/qml/page/T_Progress.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_RatingControl.qml b/example/qml/page/T_RatingControl.qml similarity index 96% rename from example/T_RatingControl.qml rename to example/qml/page/T_RatingControl.qml index 7f833bed..b1d7bbcb 100644 --- a/example/T_RatingControl.qml +++ b/example/qml/page/T_RatingControl.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Rectangle.qml b/example/qml/page/T_Rectangle.qml similarity index 99% rename from example/T_Rectangle.qml rename to example/qml/page/T_Rectangle.qml index 1b47baa4..f8e893c7 100644 --- a/example/T_Rectangle.qml +++ b/example/qml/page/T_Rectangle.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Controls import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Settings.qml b/example/qml/page/T_Settings.qml similarity index 98% rename from example/T_Settings.qml rename to example/qml/page/T_Settings.qml index ed4ac5a0..d173b58c 100644 --- a/example/T_Settings.qml +++ b/example/qml/page/T_Settings.qml @@ -3,8 +3,8 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "qrc:///global/" -import "./component" +import "qrc:///qml/global/" +import "../component" FluScrollablePage{ diff --git a/example/T_Slider.qml b/example/qml/page/T_Slider.qml similarity index 97% rename from example/T_Slider.qml rename to example/qml/page/T_Slider.qml index 6668d771..48cce7f7 100644 --- a/example/T_Slider.qml +++ b/example/qml/page/T_Slider.qml @@ -2,7 +2,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls -import "./component" +import "../component" import FluentUI FluScrollablePage{ diff --git a/example/T_StatusView.qml b/example/qml/page/T_StatusView.qml similarity index 99% rename from example/T_StatusView.qml rename to example/qml/page/T_StatusView.qml index 9040cbaa..f2774e5a 100644 --- a/example/T_StatusView.qml +++ b/example/qml/page/T_StatusView.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Controls import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_TabView.qml b/example/qml/page/T_TabView.qml similarity index 99% rename from example/T_TabView.qml rename to example/qml/page/T_TabView.qml index 97ab4160..d22d4fd2 100644 --- a/example/T_TabView.qml +++ b/example/qml/page/T_TabView.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_TableView.qml b/example/qml/page/T_TableView.qml similarity index 99% rename from example/T_TableView.qml rename to example/qml/page/T_TableView.qml index a4c29ede..eb26ac69 100644 --- a/example/T_TableView.qml +++ b/example/qml/page/T_TableView.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_TextBox.qml b/example/qml/page/T_TextBox.qml similarity index 99% rename from example/T_TextBox.qml rename to example/qml/page/T_TextBox.qml index cad1a383..1c2dfd01 100644 --- a/example/T_TextBox.qml +++ b/example/qml/page/T_TextBox.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Theme.qml b/example/qml/page/T_Theme.qml similarity index 99% rename from example/T_Theme.qml rename to example/qml/page/T_Theme.qml index 4aacdba8..9ddf2422 100644 --- a/example/T_Theme.qml +++ b/example/qml/page/T_Theme.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_TimePicker.qml b/example/qml/page/T_TimePicker.qml similarity index 98% rename from example/T_TimePicker.qml rename to example/qml/page/T_TimePicker.qml index ea647d1f..48e11091 100644 --- a/example/T_TimePicker.qml +++ b/example/qml/page/T_TimePicker.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_ToggleSwitch.qml b/example/qml/page/T_ToggleSwitch.qml similarity index 96% rename from example/T_ToggleSwitch.qml rename to example/qml/page/T_ToggleSwitch.qml index 0277a669..6123c5f8 100644 --- a/example/T_ToggleSwitch.qml +++ b/example/qml/page/T_ToggleSwitch.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_Tooltip.qml b/example/qml/page/T_Tooltip.qml similarity index 99% rename from example/T_Tooltip.qml rename to example/qml/page/T_Tooltip.qml index 2658f1ac..2bb0ce4a 100644 --- a/example/T_Tooltip.qml +++ b/example/qml/page/T_Tooltip.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Layouts import QtQuick.Window import FluentUI -import "./component" +import "../component" FluScrollablePage{ diff --git a/example/T_TreeView.qml b/example/qml/page/T_TreeView.qml similarity index 99% rename from example/T_TreeView.qml rename to example/qml/page/T_TreeView.qml index f3b26988..01a7801c 100644 --- a/example/T_TreeView.qml +++ b/example/qml/page/T_TreeView.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI -import "./component" +import "../component" FluScrollablePage { diff --git a/example/T_Typography.qml b/example/qml/page/T_Typography.qml similarity index 100% rename from example/T_Typography.qml rename to example/qml/page/T_Typography.qml diff --git a/example/page/AboutPage.qml b/example/qml/window/AboutWindow.qml similarity index 100% rename from example/page/AboutPage.qml rename to example/qml/window/AboutWindow.qml diff --git a/example/page/ChatPage.qml b/example/qml/window/ChatWindow.qml similarity index 100% rename from example/page/ChatPage.qml rename to example/qml/window/ChatWindow.qml diff --git a/example/page/LoginPage.qml b/example/qml/window/LoginWindow.qml similarity index 100% rename from example/page/LoginPage.qml rename to example/qml/window/LoginWindow.qml diff --git a/example/page/MainPage.qml b/example/qml/window/MainWindow.qml similarity index 98% rename from example/page/MainPage.qml rename to example/qml/window/MainWindow.qml index 4380381b..f2e28c05 100644 --- a/example/page/MainPage.qml +++ b/example/qml/window/MainWindow.qml @@ -4,7 +4,7 @@ import QtQuick.Controls import QtQuick.Layouts import Qt.labs.platform import FluentUI -import "qrc:///global/" +import "qrc:///qml/global/" FluWindow { id:window diff --git a/example/page/MediaPage.qml b/example/qml/window/MediaWindow.qml similarity index 100% rename from example/page/MediaPage.qml rename to example/qml/window/MediaWindow.qml diff --git a/example/page/SingleInstanceWindow.qml b/example/qml/window/SingleInstanceWindow.qml similarity index 100% rename from example/page/SingleInstanceWindow.qml rename to example/qml/window/SingleInstanceWindow.qml diff --git a/example/page/SingleTaskWindow.qml b/example/qml/window/SingleTaskWindow.qml similarity index 100% rename from example/page/SingleTaskWindow.qml rename to example/qml/window/SingleTaskWindow.qml diff --git a/example/page/StandardWindow.qml b/example/qml/window/StandardWindow.qml similarity index 100% rename from example/page/StandardWindow.qml rename to example/qml/window/StandardWindow.qml diff --git a/example/AppInfo.cpp b/example/src/AppInfo.cpp similarity index 99% rename from example/AppInfo.cpp rename to example/src/AppInfo.cpp index 5ac6cf4d..7efe1965 100644 --- a/example/AppInfo.cpp +++ b/example/src/AppInfo.cpp @@ -2,7 +2,6 @@ #include "lang/En.h" #include "lang/Zh.h" - AppInfo::AppInfo(QObject *parent) : QObject{parent} { diff --git a/example/AppInfo.h b/example/src/AppInfo.h similarity index 100% rename from example/AppInfo.h rename to example/src/AppInfo.h diff --git a/example/ChatController.cpp b/example/src/controller/ChatController.cpp similarity index 100% rename from example/ChatController.cpp rename to example/src/controller/ChatController.cpp diff --git a/example/ChatController.h b/example/src/controller/ChatController.h similarity index 97% rename from example/ChatController.h rename to example/src/controller/ChatController.h index e6781d15..3e5953d4 100644 --- a/example/ChatController.h +++ b/example/src/controller/ChatController.h @@ -11,7 +11,7 @@ #include #include #include -#include "stdafx.h" +#include "../stdafx.h" class ChatController : public QObject { diff --git a/example/lang/En.cpp b/example/src/lang/En.cpp similarity index 100% rename from example/lang/En.cpp rename to example/src/lang/En.cpp diff --git a/example/lang/En.h b/example/src/lang/En.h similarity index 100% rename from example/lang/En.h rename to example/src/lang/En.h diff --git a/example/lang/Lang.cpp b/example/src/lang/Lang.cpp similarity index 100% rename from example/lang/Lang.cpp rename to example/src/lang/Lang.cpp diff --git a/example/lang/Lang.h b/example/src/lang/Lang.h similarity index 100% rename from example/lang/Lang.h rename to example/src/lang/Lang.h diff --git a/example/lang/Zh.cpp b/example/src/lang/Zh.cpp similarity index 100% rename from example/lang/Zh.cpp rename to example/src/lang/Zh.cpp diff --git a/example/lang/Zh.h b/example/src/lang/Zh.h similarity index 100% rename from example/lang/Zh.h rename to example/src/lang/Zh.h diff --git a/example/main.cpp b/example/src/main.cpp similarity index 94% rename from example/main.cpp rename to example/src/main.cpp index 5ab1b8a0..c3580984 100644 --- a/example/main.cpp +++ b/example/src/main.cpp @@ -6,8 +6,8 @@ #include #include "lang/Lang.h" #include "AppInfo.h" -#include "ChatController.h" -#include "IPC.h" +#include "controller/ChatController.h" +#include "tool/IPC.h" int main(int argc, char *argv[]) { @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) context->setContextProperty("lang",appInfo->lang()); }); context->setContextProperty("appInfo",appInfo); - const QUrl url(QStringLiteral("qrc:/App.qml")); + const QUrl url(QStringLiteral("qrc:/qml/App.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) diff --git a/example/stdafx.h b/example/src/stdafx.h similarity index 100% rename from example/stdafx.h rename to example/src/stdafx.h diff --git a/example/IPC.cpp b/example/src/tool/IPC.cpp similarity index 100% rename from example/IPC.cpp rename to example/src/tool/IPC.cpp diff --git a/example/IPC.h b/example/src/tool/IPC.h similarity index 100% rename from example/IPC.h rename to example/src/tool/IPC.h diff --git a/src/controls/FluIconButton.qml b/src/controls/FluIconButton.qml index a59b293e..1d643597 100644 --- a/src/controls/FluIconButton.qml +++ b/src/controls/FluIconButton.qml @@ -39,7 +39,6 @@ Button { id:control width: 30 height: 30 - clip: true implicitWidth: width implicitHeight: height padding: 0 diff --git a/src/controls/FluNavigationView.qml b/src/controls/FluNavigationView.qml index 622373b6..df92a57f 100644 --- a/src/controls/FluNavigationView.qml +++ b/src/controls/FluNavigationView.qml @@ -509,6 +509,7 @@ Item { onClicked: { d.enableNavigationPanel = !d.enableNavigationPanel } + visible: Layout.preferredWidth !== 0 Behavior on Layout.preferredWidth{ NumberAnimation{ duration: 167 @@ -639,7 +640,7 @@ Item { width: layout_list.width clip: true y:nav_app_bar.height - height: 38 + height: autoSuggestBox ? 38 : 0 Loader{ id:loader_auto_suggest_box anchors.centerIn: parent diff --git a/src/controls/FluTextBoxBackground.qml b/src/controls/FluTextBoxBackground.qml index cddeef94..a8dc03e1 100644 --- a/src/controls/FluTextBoxBackground.qml +++ b/src/controls/FluTextBoxBackground.qml @@ -48,7 +48,9 @@ Rectangle{ } Behavior on height{ NumberAnimation{ - duration: 200 + duration: 167 + easing.type: Easing.BezierSpline + easing.bezierCurve: [ 1, 0, 0, 0 ] } } } diff --git a/src/controls/FluWindow.qml b/src/controls/FluWindow.qml index e35e6593..20edd7c6 100644 --- a/src/controls/FluWindow.qml +++ b/src/controls/FluWindow.qml @@ -90,7 +90,7 @@ ApplicationWindow { infoBar.showError(text,duration,moremsg); } - function registerForPageResult(path){ + function registerForWindowResult(path){ return helper.createRegister(window,path) }