diff --git a/example/qml/App.qml b/example/qml/App.qml index f45e90ec..f1781b6c 100644 --- a/example/qml/App.qml +++ b/example/qml/App.qml @@ -8,13 +8,11 @@ Window { id:app Component.onCompleted: { FluApp.init(app) - FluTheme.frameless = ("windows" === Qt.platform.os) FluTheme.darkMode = FluDarkMode.System FluApp.routes = { "/":"qrc:/example/qml/window/MainWindow.qml", "/about":"qrc:/example/qml/window/AboutWindow.qml", "/login":"qrc:/example/qml/window/LoginWindow.qml", - "/chat":"qrc:/example/qml/window/ChatWindow.qml", "/media":"qrc:/example/qml/window/MediaWindow.qml", "/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml", "/standardWindow":"qrc:/example/qml/window/StandardWindow.qml", diff --git a/example/qml/page/T_Awesome.qml b/example/qml/page/T_Awesome.qml index c3b8784c..26caa39f 100644 --- a/example/qml/page/T_Awesome.qml +++ b/example/qml/page/T_Awesome.qml @@ -8,10 +8,6 @@ FluContentPage { title:"Awesome" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - FluTextBox{ id:text_box placeholderText: "请输入关键字" diff --git a/example/qml/page/T_Badge.qml b/example/qml/page/T_Badge.qml index 6ca78562..11b9b64f 100644 --- a/example/qml/page/T_Badge.qml +++ b/example/qml/page/T_Badge.qml @@ -9,11 +9,6 @@ FluScrollablePage{ title:"Badge" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 - FluArea{ Layout.fillWidth: true Layout.topMargin: 20 diff --git a/example/qml/page/T_BreadcrumbBar.qml b/example/qml/page/T_BreadcrumbBar.qml index bf266ace..30d6809a 100644 --- a/example/qml/page/T_BreadcrumbBar.qml +++ b/example/qml/page/T_BreadcrumbBar.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"BreadcurmbBar" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 Component.onCompleted: { var items = [] diff --git a/example/qml/page/T_Buttons.qml b/example/qml/page/T_Buttons.qml index 64299d74..0547e8ed 100644 --- a/example/qml/page/T_Buttons.qml +++ b/example/qml/page/T_Buttons.qml @@ -7,12 +7,8 @@ import FluentUI import "../component" FluScrollablePage{ - title:"Buttons" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 + title:"Buttons" FluText{ Layout.topMargin: 20 diff --git a/example/qml/page/T_CalendarPicker.qml b/example/qml/page/T_CalendarPicker.qml index 11e4c23b..b7b38148 100644 --- a/example/qml/page/T_CalendarPicker.qml +++ b/example/qml/page/T_CalendarPicker.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"CalendarPicker" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Carousel.qml b/example/qml/page/T_Carousel.qml index 3461464e..83c2ed35 100644 --- a/example/qml/page/T_Carousel.qml +++ b/example/qml/page/T_Carousel.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Carousel" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_CheckBox.qml b/example/qml/page/T_CheckBox.qml index 7e2fd6af..8603bb45 100644 --- a/example/qml/page/T_CheckBox.qml +++ b/example/qml/page/T_CheckBox.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"CheckBox" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_ColorPicker.qml b/example/qml/page/T_ColorPicker.qml index 2df0c535..03195f4d 100644 --- a/example/qml/page/T_ColorPicker.qml +++ b/example/qml/page/T_ColorPicker.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"ColorPicker" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_DatePicker.qml b/example/qml/page/T_DatePicker.qml index e54fb0c8..7930bcc8 100644 --- a/example/qml/page/T_DatePicker.qml +++ b/example/qml/page/T_DatePicker.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"TimePicker" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Dialog.qml b/example/qml/page/T_Dialog.qml index ea9b2f67..ff561c8b 100644 --- a/example/qml/page/T_Dialog.qml +++ b/example/qml/page/T_Dialog.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Dialog" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Expander.qml b/example/qml/page/T_Expander.qml index 7e1245ed..21e10aa2 100644 --- a/example/qml/page/T_Expander.qml +++ b/example/qml/page/T_Expander.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Expander" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_FlipView.qml b/example/qml/page/T_FlipView.qml index 0ac49475..ba7fa49f 100644 --- a/example/qml/page/T_FlipView.qml +++ b/example/qml/page/T_FlipView.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"FlipView" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Home.qml b/example/qml/page/T_Home.qml index f7423d08..8100050d 100644 --- a/example/qml/page/T_Home.qml +++ b/example/qml/page/T_Home.qml @@ -7,11 +7,6 @@ import FluentUI FluScrollablePage{ - - leftPadding:10 - rightPadding:0 - bottomPadding:20 - ListModel{ id:model_header ListElement{ diff --git a/example/qml/page/T_InfoBar.qml b/example/qml/page/T_InfoBar.qml index c66d25ce..31621767 100644 --- a/example/qml/page/T_InfoBar.qml +++ b/example/qml/page/T_InfoBar.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"InfoBar" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_MediaPlayer.qml b/example/qml/page/T_MediaPlayer.qml index 12da086c..2508da8d 100644 --- a/example/qml/page/T_MediaPlayer.qml +++ b/example/qml/page/T_MediaPlayer.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"MediaPlayer" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 onVisibleChanged: { if(visible){ diff --git a/example/qml/page/T_Menu.qml b/example/qml/page/T_Menu.qml index 01bef380..186c96dd 100644 --- a/example/qml/page/T_Menu.qml +++ b/example/qml/page/T_Menu.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Menu" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_MultiWindow.qml b/example/qml/page/T_MultiWindow.qml index b107b560..819904dc 100644 --- a/example/qml/page/T_MultiWindow.qml +++ b/example/qml/page/T_MultiWindow.qml @@ -11,10 +11,6 @@ FluScrollablePage{ property var loginPageRegister: registerForWindowResult("/login") title:"MultiWindow" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 Connections{ target: loginPageRegister diff --git a/example/qml/page/T_Pivot.qml b/example/qml/page/T_Pivot.qml index 24838c1c..b0ba4e3f 100644 --- a/example/qml/page/T_Pivot.qml +++ b/example/qml/page/T_Pivot.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Pivot" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Progress.qml b/example/qml/page/T_Progress.qml index dc6954ff..dc0de532 100644 --- a/example/qml/page/T_Progress.qml +++ b/example/qml/page/T_Progress.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Progress" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_RatingControl.qml b/example/qml/page/T_RatingControl.qml index b1d7bbcb..fd334207 100644 --- a/example/qml/page/T_RatingControl.qml +++ b/example/qml/page/T_RatingControl.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"RatingControl" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Rectangle.qml b/example/qml/page/T_Rectangle.qml index 232e041e..96db0a7e 100644 --- a/example/qml/page/T_Rectangle.qml +++ b/example/qml/page/T_Rectangle.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Rectangle" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Settings.qml b/example/qml/page/T_Settings.qml index dd25c01e..19cb660a 100644 --- a/example/qml/page/T_Settings.qml +++ b/example/qml/page/T_Settings.qml @@ -9,10 +9,6 @@ import "../component" FluScrollablePage{ title:"Settings" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Slider.qml b/example/qml/page/T_Slider.qml index 48cce7f7..45138adb 100644 --- a/example/qml/page/T_Slider.qml +++ b/example/qml/page/T_Slider.qml @@ -8,10 +8,6 @@ import FluentUI FluScrollablePage{ title:"Slider" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_StatusView.qml b/example/qml/page/T_StatusView.qml index f2774e5a..6ba5d59c 100644 --- a/example/qml/page/T_StatusView.qml +++ b/example/qml/page/T_StatusView.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"StatusView" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ id:layout_actions diff --git a/example/qml/page/T_TabView.qml b/example/qml/page/T_TabView.qml index a03f3032..40f8d4f0 100644 --- a/example/qml/page/T_TabView.qml +++ b/example/qml/page/T_TabView.qml @@ -7,14 +7,10 @@ import "../component" FluScrollablePage{ - title:"TabView" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 - property var colors : [FluColors.Yellow,FluColors.Orange,FluColors.Red,FluColors.Magenta,FluColors.Purple,FluColors.Blue,FluColors.Teal,FluColors.Green] + title:"TabView" + Component{ id:com_page Rectangle{ diff --git a/example/qml/page/T_TableView.qml b/example/qml/page/T_TableView.qml index fa26c5da..15762109 100644 --- a/example/qml/page/T_TableView.qml +++ b/example/qml/page/T_TableView.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"TableView" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 Component.onCompleted: { const columns = [ diff --git a/example/qml/page/T_Text.qml b/example/qml/page/T_Text.qml index 51edce78..0540032e 100644 --- a/example/qml/page/T_Text.qml +++ b/example/qml/page/T_Text.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Text" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_TextBox.qml b/example/qml/page/T_TextBox.qml index 1c2dfd01..622feb7f 100644 --- a/example/qml/page/T_TextBox.qml +++ b/example/qml/page/T_TextBox.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"TextBox" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Theme.qml b/example/qml/page/T_Theme.qml index 9ddf2422..f4a77042 100644 --- a/example/qml/page/T_Theme.qml +++ b/example/qml/page/T_Theme.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Theme" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_TimePicker.qml b/example/qml/page/T_TimePicker.qml index 48e11091..672c3633 100644 --- a/example/qml/page/T_TimePicker.qml +++ b/example/qml/page/T_TimePicker.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"TimePicker" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_ToggleSwitch.qml b/example/qml/page/T_ToggleSwitch.qml index 6123c5f8..06788518 100644 --- a/example/qml/page/T_ToggleSwitch.qml +++ b/example/qml/page/T_ToggleSwitch.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"ToggleSwitch" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluArea{ Layout.fillWidth: true diff --git a/example/qml/page/T_Tooltip.qml b/example/qml/page/T_Tooltip.qml index 2bb0ce4a..2ad2d8ac 100644 --- a/example/qml/page/T_Tooltip.qml +++ b/example/qml/page/T_Tooltip.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage{ title:"Tooltip" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 FluText{ Layout.topMargin: 20 diff --git a/example/qml/page/T_TreeView.qml b/example/qml/page/T_TreeView.qml index 01a7801c..8763eb23 100644 --- a/example/qml/page/T_TreeView.qml +++ b/example/qml/page/T_TreeView.qml @@ -8,10 +8,6 @@ import "../component" FluScrollablePage { title:"TreeView" - leftPadding:10 - rightPadding:10 - bottomPadding:20 - spacing: 0 function randomName() { var names = ["张三", "李四", "王五", "赵六", "钱七", "孙八", "周九", "吴十"] diff --git a/example/qml/page/T_Typography.qml b/example/qml/page/T_Typography.qml index ce1d2db4..234debcb 100644 --- a/example/qml/page/T_Typography.qml +++ b/example/qml/page/T_Typography.qml @@ -5,11 +5,9 @@ import FluentUI FluContentPage { - title: "Typography" property real textScale: 1 - leftPadding:10 - rightPadding:10 - bottomPadding:20 + + title: "Typography" Component.onCompleted: { slider.seek(0) diff --git a/example/qml/window/AboutWindow.qml b/example/qml/window/AboutWindow.qml index 559aef58..fd8f3795 100644 --- a/example/qml/window/AboutWindow.qml +++ b/example/qml/window/AboutWindow.qml @@ -119,6 +119,7 @@ FluWindow { RowLayout{ spacing: 14 + Layout.topMargin: 20 Layout.leftMargin: 15 FluText{ text:"捐赠:" @@ -147,12 +148,11 @@ FluWindow { RowLayout{ spacing: 14 Layout.leftMargin: 15 + Layout.topMargin: 20 FluText{ id:text_desc text:"个人开发,维护不易,你们的捐赠就是我继续更新的动力!\n有什么问题提Issues,只要时间充足我就会解决的!!" } } - - } } diff --git a/example/qml/window/ChatWindow.qml b/example/qml/window/ChatWindow.qml deleted file mode 100644 index ec049836..00000000 --- a/example/qml/window/ChatWindow.qml +++ /dev/null @@ -1,261 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import FluentUI -import Controller -import QtQuick.Dialogs - -FluWindow { - - title:"ChatGPT" - width: 680 - height: 600 - minimumWidth: 500 - minimumHeight: 600 - - onInitArgument: - (argument)=>{ - scrollview.focus = true - } - - ChatController{ - id:controller - - onResponseDataChanged: { - appendMessage(false,responseData) - } - - } - - ListModel{ - id:model_message - ListElement{ - isMy:false - text:"欢迎使用ChatGPT" - } - ListElement{ - isMy:true - text:"好的,3Q" - } - } - - FluAppBar{ - id:appbar - title:"ChatGPT" - width:parent.width - } - - Component{ - id:com_text - TextEdit { - id:item_text - text: message - wrapMode: Text.WrapAnywhere - readOnly: true - selectByMouse: true - selectByKeyboard: true - selectedTextColor: Qt.rgba(51,153,255,1) - color:FluColors.Black - selectionColor: { - if(FluTheme.dark){ - return FluTheme.primaryColor.lighter - }else{ - return FluTheme.primaryColor.dark - } - } - width: Math.min(list_message.width-200,600,implicitWidth) - TapHandler{ - acceptedButtons: Qt.RightButton - onTapped: { - menu_item.showMenu(item_text.selectedText) - } - } - } - } - - FluArea{ - id:layout_content - anchors{ - top: appbar.bottom - left: parent.left - right: parent.right - bottom: layout_bottom.top - margins: 10 - } - color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(245/255,245/255,245/255,1) - ListView{ - id:list_message - anchors.fill: parent - model:model_message - clip: true - ScrollBar.vertical: FluScrollBar {} - preferredHighlightBegin: 0 - preferredHighlightEnd: 0 - highlightMoveDuration: 0 - header:Item{ - width: list_message.width - height:20 - } - footer:Item{ - width: list_message.width - height:20 - } - delegate: Item{ - width: ListView.view.width - height: childrenRect.height - - FluRectangle{ - id:item_avatar - width: 30 - height: 30 - radius:[15,15,15,15] - anchors{ - right: isMy ? parent.right : undefined - rightMargin: isMy ? 20 : undefined - left: isMy ? undefined : parent.left - leftMargin: isMy ? undefined : 20 - top:parent.top - } - Image { - asynchronous: true - anchors.fill: parent - sourceSize: Qt.size(100,100) - source: isMy ? "qrc:/example/res/svg/avatar_2.svg" : "qrc:/example/res/image/logo_openai.png" - } - } - - Rectangle{ - id:item_layout_content - color: isMy ? "#FF95EC69" : "#FFFFFF" - width: item_msg_loader.width+10 - height: item_msg_loader.height+10 - radius: 3 - anchors{ - top: item_avatar.top - right: isMy ? item_avatar.left : undefined - rightMargin: isMy ? 10 : undefined - left: isMy ? undefined : item_avatar.right - leftMargin: isMy ? undefined : 10 - - } - - Loader{ - id:item_msg_loader - property var message: model.text - anchors.centerIn: parent - sourceComponent: com_text - } - } - - - Item{ - id:item_layout_bottom - width: parent.width - anchors.top: item_layout_content.bottom - height: 20 - } - } - } - } - - FluArea{ - id:layout_bottom - height: 90 - anchors{ - bottom: parent.bottom - bottomMargin: 10 - left: parent.left - right: parent.right - leftMargin: 10 - rightMargin: 10 - } - - - ScrollView{ - id:scrollview - anchors{ - bottom: parent.bottom - left: parent.left - right: button_send.left - bottomMargin: 10 - leftMargin: 10 - rightMargin: 10 - } - height: Math.min(textbox.implicitHeight,64) - FluMultilineTextBox{ - id:textbox - focus:true - placeholderText: "请输入消息" - } - } - - FluFilledButton{ - id:button_send - text:controller.isLoading ? timer_loading.loadingText :"发送" - anchors{ - bottom: parent.bottom - right: parent.right - bottomMargin: 10 - rightMargin: 10 - } - width: 60 - disabled: controller.isLoading - onClicked:{ - var text = textbox.text - appendMessage(true,text) - controller.sendMessage(text) - textbox.clear() - } - - Timer{ - id:timer_loading - property int count : 0 - property string loadingText : "" - interval: 500 - running: controller.isLoading - repeat: true - onTriggered: { - switch(count%3){ - case 0: - loadingText = "." - break - case 1: - loadingText = ".." - break - case 2: - loadingText = "..." - break - default: - loadingText = "" - break - } - count++ - } - } - - } - } - - FluMenu{ - id:menu_item - focus: false - property string selectedText: "" - FluMenuItem{ - text:"复制" - onClicked: { - controller.clipText(menu_item.selectedText) - showSuccess("复制成功") - } - } - function showMenu(text){ - menu_item.selectedText = text - menu_item.popup() - } - } - - function appendMessage(isMy,text){ - model_message.append({isMy:isMy,text:text}) - list_message.positionViewAtEnd() - } - -} diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index 4b0e6a9a..505a445b 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -48,7 +48,7 @@ FluWindow { MenuItem { text: "退出" onTriggered: { - window.destoryWindow() + window.deleteWindow() FluApp.closeApp() } } @@ -76,7 +76,7 @@ FluWindow { positiveText:"退出" neutralText:"取消" onPositiveClicked:{ - window.destoryWindow() + window.deleteWindow() FluApp.closeApp() } @@ -102,6 +102,27 @@ FluWindow { ItemsOriginal.startPageByItem(data) } } + actionItem:Item{ + height: 40 + width: 148 + RowLayout{ + anchors.centerIn: parent + spacing: 5 + FluText{ + text:lang.dark_mode + } + FluToggleSwitch{ + selected: FluTheme.dark + clickFunc:function(){ + if(FluTheme.dark){ + FluTheme.darkMode = FluDarkMode.Light + }else{ + FluTheme.darkMode = FluDarkMode.Dark + } + } + } + } + } Component.onCompleted: { ItemsOriginal.navigationView = nav_view ItemsFooter.navigationView = nav_view diff --git a/example/qml/window/main.qml b/example/qml/window/main.qml new file mode 100644 index 00000000..e466a8e3 --- /dev/null +++ b/example/qml/window/main.qml @@ -0,0 +1,14 @@ +import QtQuick +import FluentUI + +Window { + id:window + width: 400 + height: 400 + visible: true + + FluButton{ + text:"123" + } + +} diff --git a/example/src/controller/ChatController.cpp b/example/src/controller/ChatController.cpp deleted file mode 100644 index 16f59d21..00000000 --- a/example/src/controller/ChatController.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "ChatController.h" - -ChatController::ChatController(QObject *parent) - : QObject{parent} -{ - isLoading(false); - networkManager = new QNetworkAccessManager(this); -} - - -void ChatController::sendMessage(const QString& text){ - isLoading(true); - QUrl apiUrl("https://api.openai.com/v1/chat/completions"); - QNetworkRequest request(apiUrl); - request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - request.setRawHeader("Authorization", QString::fromStdString("Bearer %1").arg(QString::fromUtf8(QByteArray::fromBase64(baseKey.toUtf8()))).toUtf8()); - QJsonObject requestData; - requestData.insert("model", "gpt-3.5-turbo"); - messages.append(createMessage("user",text)); - requestData.insert("messages", messages); - QJsonDocument requestDoc(requestData); - QByteArray requestDataBytes = requestDoc.toJson(); - QNetworkReply* reply = networkManager->post(request, requestDataBytes); - connect(reply, &QNetworkReply::finished,this, [=]() { - if (reply->error() == QNetworkReply::NoError) { - QString responseString = QString::fromUtf8(reply->readAll()); - qDebug() << responseString; - QJsonDocument doc = QJsonDocument::fromJson(responseString.toUtf8()); - QJsonObject jsonObj = doc.object(); - QString text = jsonObj.value("choices").toArray().at(0).toObject().value("message").toObject().value("content").toString(); - if(text.isEmpty()){ - text = "响应错误:content为空数据"; - }else{ - messages.append(createMessage("assistant",text)); - } - responseData(text.trimmed()); - } else { - responseData("网络错误:"+reply->errorString()); - } - isLoading(false); - reply->deleteLater(); - }); -} - -QJsonObject ChatController::createMessage(const QString& role,const QString& content){ - QJsonObject message; - message.insert("role",role); - message.insert("content",content); - return message; -} - -void ChatController::clipText(const QString& text){ - qDebug()<setText(text); -} diff --git a/example/src/controller/ChatController.h b/example/src/controller/ChatController.h deleted file mode 100644 index 3e5953d4..00000000 --- a/example/src/controller/ChatController.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef CHATCONTROLLER_H -#define CHATCONTROLLER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../stdafx.h" - -class ChatController : public QObject -{ - Q_OBJECT - Q_PROPERTY_AUTO(bool,isLoading) - Q_PROPERTY_AUTO(QString,responseData); -public: - explicit ChatController(QObject *parent = nullptr); - - Q_INVOKABLE void sendMessage(const QString& text); - Q_INVOKABLE void clipText(const QString& text); -private: - QJsonObject createMessage(const QString& role,const QString& content); - -private: - QNetworkAccessManager* networkManager; - QJsonArray messages; - QString baseKey = "c2stbXgxWm5MQkZ5TzhNYzNmRWl6eDZUM0JsYmtGSnNBWjNiakJjSXB6WGN3QW9KSk11"; -}; - -#endif // CHATCONTROLLER_H diff --git a/example/src/main.cpp b/example/src/main.cpp index e76d8b85..8663e40b 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -6,11 +6,7 @@ #include #include "lang/Lang.h" #include "AppInfo.h" -#include "controller/ChatController.h" #include "tool/IPC.h" -#if defined(STATICLIB) -#include -#endif int main(int argc, char *argv[]) { @@ -41,10 +37,6 @@ int main(int argc, char *argv[]) } app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; -#if defined(STATICLIB) - FluentUI::initialize(&engine); -#endif - qmlRegisterType("Controller",1,0,"ChatController"); QQmlContext * context = engine.rootContext(); Lang* lang = appInfo->lang(); context->setContextProperty("lang",lang); @@ -53,6 +45,7 @@ int main(int argc, char *argv[]) }); context->setContextProperty("appInfo",appInfo); const QUrl url(QStringLiteral("qrc:/example/qml/App.qml")); +// const QUrl url(QStringLiteral("qrc:/example/qml/window/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d7a087ee..0f13f206 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,13 +9,16 @@ if(APPLE) set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) endif() -#设置可执行文件输出目录 +##设置可执行文件输出目录 if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin) else() - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/release) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/bin) endif() +#设置QML路径 +set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/qml) + #设置版本号 add_definitions(-DVERSION=1,2,9,0) @@ -36,7 +39,7 @@ foreach(filepath ${QML_PATHS}) endforeach(filepath) #遍历所有资源文件 -file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp) +file(GLOB_RECURSE RES_PATHS *.png *.jpg *.svg *.ico *.ttf *.webp *.metainfo) foreach(filepath ${RES_PATHS}) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath}) list(APPEND resource_files ${filename}) @@ -49,8 +52,8 @@ foreach(filepath IN LISTS qml_files resource_files) endforeach() #添加qml模块 +qt_add_library(fluentui SHARED) qt_add_qml_module(fluentui - OUTPUT_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI VERSION 1.0 URI "FluentUI" SOURCES ${sources_files} fluentui.rc diff --git a/src/Def.h b/src/Def.h index 41855239..8a2bf595 100644 --- a/src/Def.h +++ b/src/Def.h @@ -6,13 +6,13 @@ namespace Fluent_DarkMode { Q_NAMESPACE - enum Fluent_DarkModeType { - System = 0x0, - Light = 0x1, - Dark = 0x2, - }; - QML_NAMED_ELEMENT(FluDarkMode) -Q_ENUMS(Fluent_DarkModeType); +enum Fluent_DarkModeType { + System = 0x0, + Light = 0x1, + Dark = 0x2, +}; +Q_ENUM_NS(Fluent_DarkModeType) +QML_NAMED_ELEMENT(FluDarkMode) } namespace Fluent_Awesome { @@ -1422,8 +1422,8 @@ enum class Fluent_AwesomeType { SpeechSolidBold=0xf8b2, ClickedOutLoudSolidBold=0xf8b3, }; - QML_NAMED_ELEMENT(FluentIcons) -Q_ENUMS(Fluent_AwesomeType) +Q_ENUM_NS(Fluent_AwesomeType) +QML_NAMED_ELEMENT(FluentIcons) } #endif // DEF_H diff --git a/src/FluApp.cpp b/src/FluApp.cpp index c443e6dd..0a129f41 100644 --- a/src/FluApp.cpp +++ b/src/FluApp.cpp @@ -9,27 +9,16 @@ #include #include #include "Def.h" -#ifdef Q_OS_WIN -#pragma comment(lib, "Dwmapi.lib") -#pragma comment(lib, "User32.lib") -#include -#include -#include -static bool isCompositionEnabled() + +FluApp* FluApp::m_instance = nullptr; + +FluApp *FluApp::getInstance() { - BOOL composition_enabled = FALSE; - bool success = ::DwmIsCompositionEnabled(&composition_enabled) == S_OK; - return composition_enabled && success; + if(FluApp::m_instance == nullptr){ + FluApp::m_instance = new FluApp; + } + return FluApp::m_instance; } -#endif - -FluApp* FluApp::fluApp = nullptr; - -FluTheme* FluApp::fluTheme = nullptr; - -FluColors* FluApp::fluColors = nullptr; - -FluTools* FluApp::fluTools = nullptr; FluApp::FluApp(QObject *parent) : QObject{parent} @@ -38,43 +27,14 @@ FluApp::FluApp(QObject *parent) } FluApp::~FluApp(){ - if (nativeEvent != Q_NULLPTR) { - delete nativeEvent; - nativeEvent = Q_NULLPTR; - } -} -void FluApp::setFluApp(FluApp* val){ - FluApp::fluApp = val; -} - -void FluApp::setFluTheme(FluTheme* val){ - FluApp::fluTheme = val; -} - -void FluApp::setFluColors(FluColors* val){ - FluApp::fluColors = val; -} - -void FluApp::setFluTools(FluTools* val){ - FluApp::fluTools = val; } void FluApp::init(QQuickWindow *window){ this->appWindow = window; - QQmlEngine *engine = qmlEngine(appWindow); - QQmlComponent component(engine, ":/FluentUI/Controls/FluSingleton.qml"); - component.create(); - nativeEvent = new NativeEventFilter(); - qApp->installNativeEventFilter(nativeEvent); } void FluApp::run(){ -#ifdef Q_OS_WIN - if(!isCompositionEnabled()){ - fluTheme->frameless(false); - } -#endif navigate(initialRoute()); } @@ -113,9 +73,6 @@ void FluApp::navigate(const QString& route,const QJsonObject& argument,FluRegist } } view = qobject_cast(component.createWithInitialProperties(properties)); - if(fluTheme->frameless()){ - view->setFlag(Qt::FramelessWindowHint,true); - } wnds.insert(view->winId(),view); if(fluRegister){ fluRegister->to(view); diff --git a/src/FluApp.h b/src/FluApp.h index 289cae06..dab8e002 100644 --- a/src/FluApp.h +++ b/src/FluApp.h @@ -11,7 +11,6 @@ #include "FluTheme.h" #include "FluTools.h" #include "FluColors.h" -#include "NativeEventFilter.h" #include "FluRegister.h" #include "stdafx.h" @@ -33,11 +32,19 @@ class FluApp : public QObject QML_NAMED_ELEMENT(FluApp) QML_SINGLETON - -public: +private: + /** + * @brief FluApp 将默认构造函数设置为私有,则qml创建单例就会走create工厂方法创建单例 + * @param parent + */ explicit FluApp(QObject *parent = nullptr); +public: ~FluApp(); - + static FluApp *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) + { + return getInstance(); + } + static FluApp *getInstance(); /** * @brief run */ @@ -69,62 +76,14 @@ public: */ Q_INVOKABLE void closeApp(); - /** - * @brief setFluApp 在FluSingleton.qml调用,拿到QML中FluApp的单例 - * @param val - */ - Q_INVOKABLE void setFluApp(FluApp* val); - - /** - * @brief setFluTheme 在FluSingleton.qml调用,拿到QML中FluTheme的单例 - * @param val - */ - Q_INVOKABLE void setFluTheme(FluTheme* val); - - /** - * @brief setFluColors 在FluSingleton.qml调用,拿到QML中FluColors的单例 - * @param val - */ - Q_INVOKABLE void setFluColors(FluColors* val); - - /** - * @brief setFluColors 在FluSingleton.qml调用,拿到QML中FluTools的单例 - * @param val - */ - Q_INVOKABLE void setFluTools(FluTools* val); - public: /** * @brief wnds */ QMap wnds; - /** - * @brief fluApp - */ - static FluApp* fluApp; - - /** - * @brief fluTheme - */ - static FluTheme* fluTheme; - - /** - * @brief fluColors - */ - static FluColors* fluColors; - - /** - * @brief fluTools - */ - static FluTools* fluTools; - private: - /** - * @brief nativeEvent - */ - NativeEventFilter *nativeEvent = Q_NULLPTR; - + static FluApp* m_instance; /** * @brief appWindow */ diff --git a/src/FluColors.cpp b/src/FluColors.cpp index feaeb78c..46e7536d 100644 --- a/src/FluColors.cpp +++ b/src/FluColors.cpp @@ -1,5 +1,15 @@ #include "FluColors.h" +FluColors* FluColors::m_instance = nullptr; + +FluColors *FluColors::getInstance() +{ + if(FluColors::m_instance == nullptr){ + FluColors::m_instance = new FluColors; + } + return FluColors::m_instance; +} + FluColors::FluColors(QObject *parent) : QObject{parent} { diff --git a/src/FluColors.h b/src/FluColors.h index 34b6e56a..9b0ac95a 100644 --- a/src/FluColors.h +++ b/src/FluColors.h @@ -46,8 +46,15 @@ class FluColors : public QObject Q_PROPERTY_AUTO(FluColorSet*,Green); QML_NAMED_ELEMENT(FluColors) QML_SINGLETON -public: +private: explicit FluColors(QObject *parent = nullptr); + static FluColors* m_instance; +public: + static FluColors *getInstance(); + static FluColors *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) + { + return getInstance(); + } }; #endif // FLUCOLORS_H diff --git a/src/FluRegister.cpp b/src/FluRegister.cpp index e698f13e..4cc8c6da 100644 --- a/src/FluRegister.cpp +++ b/src/FluRegister.cpp @@ -12,7 +12,7 @@ FluRegister::FluRegister(QObject *parent) } void FluRegister::launch(const QJsonObject& argument){ - FluApp::fluApp->navigate(path(),argument,this); + FluApp::getInstance()->navigate(path(),argument,this); } void FluRegister::onResult(const QJsonObject& data){ diff --git a/src/FluTheme.cpp b/src/FluTheme.cpp index b5459d0d..d4c1ab4e 100644 --- a/src/FluTheme.cpp +++ b/src/FluTheme.cpp @@ -5,15 +5,24 @@ #include "FluApp.h" #include +FluTheme* FluTheme::m_instance = nullptr; + +FluTheme *FluTheme::getInstance() +{ + if(FluTheme::m_instance == nullptr){ + FluTheme::m_instance = new FluTheme; + } + return FluTheme::m_instance; +} + FluTheme::FluTheme(QObject *parent) : QObject{parent} { connect(this,&FluTheme::darkModeChanged,this,[=]{ Q_EMIT darkChanged(); }); - primaryColor(FluApp::fluColors->Blue()); + primaryColor(FluColors::getInstance()->Blue()); nativeText(false); - frameless(true); darkMode(Fluent_DarkMode::Fluent_DarkModeType::Light); qApp->installEventFilter(this); } diff --git a/src/FluTheme.h b/src/FluTheme.h index 1cd388b6..1c602918 100644 --- a/src/FluTheme.h +++ b/src/FluTheme.h @@ -22,11 +22,6 @@ class FluTheme : public QObject */ Q_PROPERTY_AUTO(FluColorSet*,primaryColor) - /** - * @brief frameless 是否是无边框窗口,只支持windows部分电脑 - */ - Q_PROPERTY_AUTO(bool,frameless); - /** * @brief darkMode 夜间模式,支持System=0、Light=1、Dark=2 */ @@ -39,8 +34,15 @@ class FluTheme : public QObject QML_NAMED_ELEMENT(FluTheme) QML_SINGLETON -public: +private: + static FluTheme* m_instance; explicit FluTheme(QObject *parent = nullptr); +public: + static FluTheme *getInstance(); + static FluTheme *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) + { + return getInstance(); + } bool dark(); Q_SIGNAL void darkChanged(); private: diff --git a/src/FluTools.cpp b/src/FluTools.cpp index 16b24dfe..8307a639 100644 --- a/src/FluTools.cpp +++ b/src/FluTools.cpp @@ -3,6 +3,17 @@ #include #include +FluTools* FluTools::m_instance = nullptr; + +FluTools *FluTools::getInstance() +{ + if(FluTools::m_instance == nullptr){ + FluTools::m_instance = new FluTools; + } + return FluTools::m_instance; +} + + FluTools::FluTools(QObject *parent) : QObject{parent} { diff --git a/src/FluTools.h b/src/FluTools.h index 01a634f9..5264a860 100644 --- a/src/FluTools.h +++ b/src/FluTools.h @@ -13,10 +13,15 @@ class FluTools : public QObject QML_NAMED_ELEMENT(FluTools) QML_SINGLETON - -public: +private: explicit FluTools(QObject *parent = nullptr); - + static FluTools* m_instance; +public: + static FluTools *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) + { + return getInstance(); + } + static FluTools *getInstance(); /** * @brief clipText 将字符串添加到剪切板 * @param text diff --git a/src/NativeEventFilter.cpp b/src/NativeEventFilter.cpp deleted file mode 100644 index 6966cbf7..00000000 --- a/src/NativeEventFilter.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include "NativeEventFilter.h" -#include "FluTheme.h" -#include "FluApp.h" -#ifdef Q_OS_WIN -#pragma comment(lib, "Dwmapi.lib") -#pragma comment(lib, "User32.lib") -#include -#include -#endif - -bool NativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) -{ -#ifdef Q_OS_WIN - if (eventType == "windows_generic_MSG" && FluApp::fluTheme->frameless()) { - MSG* msg = static_cast(message); - if (msg == Q_NULLPTR) - return false; - if(!FluApp::fluApp->wnds.contains((WId)msg->hwnd)){ - return false; - } - switch(msg->message) { - case WM_NCCALCSIZE:{ - NCCALCSIZE_PARAMS& params = *reinterpret_cast(msg->lParam); - if (params.rgrc[0].top != 0) - params.rgrc[0].top -= 1; - *result = WVR_REDRAW; - return true; - } - case WM_NCHITTEST: { - auto view = FluApp::fluApp->wnds[(WId)msg->hwnd]; - bool isResize = !(view->maximumWidth()==view->minimumWidth()&&view->maximumHeight()==view->minimumHeight()); - const LONG borderWidth = 8; - RECT winrect; - GetWindowRect(msg->hwnd, &winrect); - long x = GET_X_LPARAM(msg->lParam); - long y = GET_Y_LPARAM(msg->lParam); - if (x >= winrect.left && x < winrect.left + borderWidth && - y < winrect.bottom && y >= winrect.bottom - borderWidth && isResize) { - *result = HTBOTTOMLEFT; - return true; - } - if (x < winrect.right && x >= winrect.right - borderWidth && - y < winrect.bottom && y >= winrect.bottom - borderWidth && isResize) { - *result = HTBOTTOMRIGHT; - return true; - } - if (x >= winrect.left && x < winrect.left + borderWidth && - y >= winrect.top && y < winrect.top + borderWidth && isResize) { - *result = HTTOPLEFT; - return true; - } - if (x < winrect.right && x >= winrect.right - borderWidth && - y >= winrect.top && y < winrect.top + borderWidth && isResize) { - *result = HTTOPRIGHT; - return true; - } - if (x >= winrect.left && x < winrect.left + borderWidth && isResize) { - *result = HTLEFT; - return true; - } - if (x < winrect.right && x >= winrect.right - borderWidth && isResize) { - *result = HTRIGHT; - return true; - } - if (y < winrect.bottom && y >= winrect.bottom - borderWidth && isResize) { - *result = HTBOTTOM; - return true; - } - if (y >= winrect.top && y < winrect.top + borderWidth && isResize) { - *result = HTTOP; - return true; - } - return false; - } - default: - break; - } - } -#endif - return false; -} diff --git a/src/NativeEventFilter.h b/src/NativeEventFilter.h deleted file mode 100644 index 3b604550..00000000 --- a/src/NativeEventFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef NATIVEEVENTFILTER_H -#define NATIVEEVENTFILTER_H - -#include -#include - -/** - * @brief The NativeEventFilter class - */ -class NativeEventFilter : public QAbstractNativeEventFilter -{ - -public: - bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override; -}; - -#endif // NATIVEEVENTFILTER_H diff --git a/src/WindowHelper.cpp b/src/WindowHelper.cpp index e72cf59a..6e1f7ee3 100644 --- a/src/WindowHelper.cpp +++ b/src/WindowHelper.cpp @@ -2,20 +2,6 @@ #include "FluRegister.h" #include "FluApp.h" -#include "FluTheme.h" - -#ifdef Q_OS_WIN -#pragma comment(lib, "Dwmapi.lib") -#pragma comment(lib, "User32.lib") -#include -#include -#include -enum class Style : DWORD -{ - windowed = (WS_OVERLAPPEDWINDOW | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CLIPCHILDREN), - aero_borderless = (WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CLIPCHILDREN) -}; -#endif WindowHelper::WindowHelper(QObject *parent) : QObject{parent} @@ -27,20 +13,6 @@ void WindowHelper::initWindow(QQuickWindow* window){ this->window = window; } -void WindowHelper::firstUpdate(){ -#ifdef Q_OS_WIN - if(FluApp::fluTheme->frameless()){ - HWND wnd = (HWND)window->winId(); - SetWindowLongPtr(wnd, GWL_STYLE, static_cast(Style::aero_borderless)); - const MARGINS shadow_on = { 1, 1, 1, 1 }; - DwmExtendFrameIntoClientArea(wnd, &shadow_on); - SetWindowPos(wnd, Q_NULLPTR, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE); - ShowWindow(wnd, SW_SHOW); - window->setFlag(Qt::FramelessWindowHint,false); - } -#endif -} - QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){ FluRegister *p = new FluRegister(window); p->from(window); @@ -48,9 +20,9 @@ QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){ return QVariant::fromValue(p); } -void WindowHelper::destoryWindow(){ +void WindowHelper::deleteWindow(){ if(this->window){ - FluApp::fluApp->wnds.remove(this->window->winId()); + FluApp::getInstance()->wnds.remove(this->window->winId()); this->window->deleteLater(); } } diff --git a/src/WindowHelper.h b/src/WindowHelper.h index 0e60c518..075a9b35 100644 --- a/src/WindowHelper.h +++ b/src/WindowHelper.h @@ -25,9 +25,9 @@ public: Q_INVOKABLE void initWindow(QQuickWindow* window); /** - * @brief destoryWindow 销毁窗口,释放资源,QML中的Window close并不会销毁窗口,只是把窗口隐藏了 + * @brief deleteWindow 销毁窗口,释放资源,QML中的Window close并不会销毁窗口,只是把窗口隐藏了 */ - Q_INVOKABLE void destoryWindow(); + Q_INVOKABLE void deleteWindow(); /** * @brief createRegister 创建一个FluRegsiter对象,在FluWindow中registerForWindowResult方法调用 @@ -37,11 +37,6 @@ public: */ Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path); - /** - * @brief firstUpdate 窗口创建成功后调用,只调用一次 - */ - Q_INVOKABLE void firstUpdate(); - private: QQuickWindow* window; }; diff --git a/src/imports/FluentUI/Controls/FluAppBar.qml b/src/imports/FluentUI/Controls/FluAppBar.qml index d5184a8a..c530c84c 100644 --- a/src/imports/FluentUI/Controls/FluAppBar.qml +++ b/src/imports/FluentUI/Controls/FluAppBar.qml @@ -31,7 +31,7 @@ Rectangle{ id:root color: Qt.rgba(0,0,0,0) - visible: FluTheme.frameless + visible: false height: visible ? 30 : 0 opacity: visible z: 65535 diff --git a/src/imports/FluentUI/Controls/FluNavigationView.qml b/src/imports/FluentUI/Controls/FluNavigationView.qml index 21ab7264..2f951438 100644 --- a/src/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/imports/FluentUI/Controls/FluNavigationView.qml @@ -19,12 +19,8 @@ Item { property FluObject items property FluObject footerItems property int displayMode: FluNavigationView.Auto - property Component autoSuggestBox - property var window : { - if(Window.window == null) - return null - return Window.window - } + property Component autoSuggestBox + property Component actionItem id:control @@ -471,7 +467,7 @@ Item { Item { id:nav_app_bar width: parent.width - height: 50 + height: 40 z:999 RowLayout{ height:parent.height @@ -479,8 +475,8 @@ Item { FluIconButton{ iconSource: FluentIcons.ChromeBack Layout.leftMargin: 5 - Layout.preferredWidth: 40 - Layout.preferredHeight: 40 + Layout.preferredWidth: 30 + Layout.preferredHeight: 30 Layout.alignment: Qt.AlignVCenter disabled: nav_swipe.depth === 1 iconSize: 13 @@ -503,8 +499,8 @@ Item { id:btn_nav iconSource: FluentIcons.GlobalNavButton iconSize: 15 - Layout.preferredWidth: d.isMinimal ? 40 : 0 - Layout.preferredHeight: 40 + Layout.preferredWidth: d.isMinimal ? 30 : 0 + Layout.preferredHeight: 30 Layout.alignment: Qt.AlignVCenter onClicked: { d.enableNavigationPanel = !d.enableNavigationPanel @@ -529,6 +525,7 @@ Item { } return 5 } + sourceSize: Qt.size(40,40) Layout.alignment: Qt.AlignVCenter } FluText{ @@ -538,6 +535,22 @@ Item { font: FluTextStyle.Body } } + + Item{ + anchors.right: parent.right + height: parent.height + width: { + if(loader_action.item){ + return loader_action.item.width + } + return 0 + } + Loader{ + id:loader_action + anchors.centerIn: parent + sourceComponent: actionItem + } + } } Item{ @@ -620,7 +633,7 @@ Item { if(d.isMinimal || d.isCompactAndPanel){ return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1) } - if(window && window.active){ + if(Window.window.active){ return FluTheme.dark ? Qt.rgba(26/255,34/255,41/255,1) : Qt.rgba(238/255,244/255,249/255,1) } return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) diff --git a/src/imports/FluentUI/Controls/FluScrollablePage.qml b/src/imports/FluentUI/Controls/FluScrollablePage.qml index 22bb114d..f71b85c6 100644 --- a/src/imports/FluentUI/Controls/FluScrollablePage.qml +++ b/src/imports/FluentUI/Controls/FluScrollablePage.qml @@ -8,19 +8,20 @@ Item { property alias title: text_title.text default property alias content: container.data - property int spacing : 5 - property int leftPadding: 0 + property int spacing : 0 + property int leftPadding: 10 property int topPadding: 0 - property int rightPadding: 0 - property int bottomPadding: 0 + property int rightPadding: 10 + property int bottomPadding: 10 id:control FluText{ id:text_title - font: FluTextStyle.TitleLarge + font: FluTextStyle.Title visible: text !== "" - height: visible?implicitHeight:0 + height: visible ? implicitHeight : 0 + padding: 0 anchors{ top: parent.top topMargin: control.topPadding diff --git a/src/imports/FluentUI/Controls/FluSingleton.qml b/src/imports/FluentUI/Controls/FluSingleton.qml deleted file mode 100644 index bee9dd9d..00000000 --- a/src/imports/FluentUI/Controls/FluSingleton.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick -import QtQuick.Controls -import FluentUI - -QtObject { - - id:control - - Component.onCompleted: { - FluApp.setFluApp(FluApp) - FluApp.setFluColors(FluColors) - FluApp.setFluTheme(FluTheme) - FluApp.setFluTools(FluTools) - } - -} diff --git a/src/imports/FluentUI/Controls/FluTableView.qml b/src/imports/FluentUI/Controls/FluTableView.qml index 965d67d8..ff8df19d 100644 --- a/src/imports/FluentUI/Controls/FluTableView.qml +++ b/src/imports/FluentUI/Controls/FluTableView.qml @@ -1,5 +1,6 @@ import QtQuick import QtQuick.Controls +import QtQuick.Controls.Basic import QtQuick.Layouts import FluentUI @@ -144,12 +145,22 @@ Item { } } model:model_data_source - delegate: Item{ + delegate: Control{ + id:item_control height: table_row.maxHeight width: layout_table.width property var model_values : getObjectValues(index) property var itemObject: getObject(index) property var listModel: model + Rectangle{ + anchors.fill: parent + color: { + if(item_control.hovered){ + return FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(251/255,251/255,251/255,1) + } + return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(1,1,1,1) + } + } Row{ id: table_row spacing: 0 diff --git a/src/imports/FluentUI/Controls/FluWindow.qml b/src/imports/FluentUI/Controls/FluWindow.qml index ce7f0e12..2c8453eb 100644 --- a/src/imports/FluentUI/Controls/FluWindow.qml +++ b/src/imports/FluentUI/Controls/FluWindow.qml @@ -4,7 +4,7 @@ import QtQuick.Controls import QtQuick.Layouts import FluentUI -ApplicationWindow { +Window { enum LaunchMode { Standard, @@ -20,7 +20,7 @@ ApplicationWindow { property var pageRegister property var closeFunc: function(event){ if(closeDestory){ - destoryWindow() + deleteWindow() }else{ visible = false event.accepted = false @@ -28,13 +28,9 @@ ApplicationWindow { } signal initArgument(var argument) - QtObject{ - id:d - property bool firstFlag: true - } - id:window - background: Rectangle{ + Rectangle{ + anchors.fill: parent color: { if(active){ return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(238/255,244/255,249/255,1) @@ -51,17 +47,9 @@ ApplicationWindow { Item{ id:container anchors.fill: parent - anchors.margins: window.visibility === Window.Maximized && FluTheme.frameless ? 8/Screen.devicePixelRatio : 0 clip: true } - onActiveChanged: { - if(d.firstFlag){ - helper.firstUpdate() - d.firstFlag = false - } - } - onClosing:(event)=>closeFunc(event) FluInfoBar{ @@ -76,8 +64,6 @@ ApplicationWindow { Component.onCompleted: { helper.initWindow(window) initArgument(argument) - window.x = (Screen.width - window.width)/2 - window.y = (Screen.desktopAvailableHeight - window.height)/2 } function showSuccess(text,duration,moremsg){ @@ -100,8 +86,8 @@ ApplicationWindow { return helper.createRegister(window,path) } - function destoryWindow(){ - helper.destoryWindow() + function deleteWindow(){ + helper.deleteWindow() } function onResult(data){ diff --git a/src/imports/FluentUI/designer/fluentui.metainfo b/src/imports/FluentUI/designer/fluentui.metainfo new file mode 100644 index 00000000..f5b27142 --- /dev/null +++ b/src/imports/FluentUI/designer/fluentui.metainfo @@ -0,0 +1,17 @@ +MetaInfo { + Type { + name: "FluentUI.Controls.FluButton" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "FluButton" + category: "FluentUI - Controls" + libraryIcon: "images/button-icon.png" + version: "2.0" + requiredImport: "FluentUI" + toolTip: qsTr("A button with text.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" } + } + } +} \ No newline at end of file diff --git a/src/imports/FluentUI/designer/images/busyindicator-icon.png b/src/imports/FluentUI/designer/images/busyindicator-icon.png new file mode 100644 index 00000000..666d1ed9 Binary files /dev/null and b/src/imports/FluentUI/designer/images/busyindicator-icon.png differ diff --git a/src/imports/FluentUI/designer/images/busyindicator-icon16.png b/src/imports/FluentUI/designer/images/busyindicator-icon16.png new file mode 100644 index 00000000..5aa57d7f Binary files /dev/null and b/src/imports/FluentUI/designer/images/busyindicator-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/busyindicator-icon@2x.png b/src/imports/FluentUI/designer/images/busyindicator-icon@2x.png new file mode 100644 index 00000000..bb2278ff Binary files /dev/null and b/src/imports/FluentUI/designer/images/busyindicator-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/button-icon.png b/src/imports/FluentUI/designer/images/button-icon.png new file mode 100644 index 00000000..c44909f6 Binary files /dev/null and b/src/imports/FluentUI/designer/images/button-icon.png differ diff --git a/src/imports/FluentUI/designer/images/button-icon16.png b/src/imports/FluentUI/designer/images/button-icon16.png new file mode 100644 index 00000000..5c921deb Binary files /dev/null and b/src/imports/FluentUI/designer/images/button-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/button-icon@2x.png b/src/imports/FluentUI/designer/images/button-icon@2x.png new file mode 100644 index 00000000..f90a1ba7 Binary files /dev/null and b/src/imports/FluentUI/designer/images/button-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/checkbox-icon.png b/src/imports/FluentUI/designer/images/checkbox-icon.png new file mode 100644 index 00000000..ee669b3a Binary files /dev/null and b/src/imports/FluentUI/designer/images/checkbox-icon.png differ diff --git a/src/imports/FluentUI/designer/images/checkbox-icon16.png b/src/imports/FluentUI/designer/images/checkbox-icon16.png new file mode 100644 index 00000000..8d89eab8 Binary files /dev/null and b/src/imports/FluentUI/designer/images/checkbox-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/checkbox-icon@2x.png b/src/imports/FluentUI/designer/images/checkbox-icon@2x.png new file mode 100644 index 00000000..51c5601d Binary files /dev/null and b/src/imports/FluentUI/designer/images/checkbox-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/combobox-icon.png b/src/imports/FluentUI/designer/images/combobox-icon.png new file mode 100644 index 00000000..2d31b17c Binary files /dev/null and b/src/imports/FluentUI/designer/images/combobox-icon.png differ diff --git a/src/imports/FluentUI/designer/images/combobox-icon16.png b/src/imports/FluentUI/designer/images/combobox-icon16.png new file mode 100644 index 00000000..15fc3505 Binary files /dev/null and b/src/imports/FluentUI/designer/images/combobox-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/combobox-icon@2x.png b/src/imports/FluentUI/designer/images/combobox-icon@2x.png new file mode 100644 index 00000000..5f823905 Binary files /dev/null and b/src/imports/FluentUI/designer/images/combobox-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/control-icon.png b/src/imports/FluentUI/designer/images/control-icon.png new file mode 100644 index 00000000..fd9e4e8f Binary files /dev/null and b/src/imports/FluentUI/designer/images/control-icon.png differ diff --git a/src/imports/FluentUI/designer/images/control-icon16.png b/src/imports/FluentUI/designer/images/control-icon16.png new file mode 100644 index 00000000..31c76548 Binary files /dev/null and b/src/imports/FluentUI/designer/images/control-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/control-icon@2x.png b/src/imports/FluentUI/designer/images/control-icon@2x.png new file mode 100644 index 00000000..22604d24 Binary files /dev/null and b/src/imports/FluentUI/designer/images/control-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/delaybutton-icon.png b/src/imports/FluentUI/designer/images/delaybutton-icon.png new file mode 100644 index 00000000..5a55bd9f Binary files /dev/null and b/src/imports/FluentUI/designer/images/delaybutton-icon.png differ diff --git a/src/imports/FluentUI/designer/images/delaybutton-icon16.png b/src/imports/FluentUI/designer/images/delaybutton-icon16.png new file mode 100644 index 00000000..cd21394e Binary files /dev/null and b/src/imports/FluentUI/designer/images/delaybutton-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/delaybutton-icon@2x.png b/src/imports/FluentUI/designer/images/delaybutton-icon@2x.png new file mode 100644 index 00000000..7beee2fa Binary files /dev/null and b/src/imports/FluentUI/designer/images/delaybutton-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/dial-icon.png b/src/imports/FluentUI/designer/images/dial-icon.png new file mode 100644 index 00000000..b3b63e35 Binary files /dev/null and b/src/imports/FluentUI/designer/images/dial-icon.png differ diff --git a/src/imports/FluentUI/designer/images/dial-icon16.png b/src/imports/FluentUI/designer/images/dial-icon16.png new file mode 100644 index 00000000..8d8c7c09 Binary files /dev/null and b/src/imports/FluentUI/designer/images/dial-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/dial-icon@2x.png b/src/imports/FluentUI/designer/images/dial-icon@2x.png new file mode 100644 index 00000000..22547a16 Binary files /dev/null and b/src/imports/FluentUI/designer/images/dial-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/frame-icon.png b/src/imports/FluentUI/designer/images/frame-icon.png new file mode 100644 index 00000000..32abc8bf Binary files /dev/null and b/src/imports/FluentUI/designer/images/frame-icon.png differ diff --git a/src/imports/FluentUI/designer/images/frame-icon16.png b/src/imports/FluentUI/designer/images/frame-icon16.png new file mode 100644 index 00000000..e5b65ad5 Binary files /dev/null and b/src/imports/FluentUI/designer/images/frame-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/frame-icon@2x.png b/src/imports/FluentUI/designer/images/frame-icon@2x.png new file mode 100644 index 00000000..8b876f38 Binary files /dev/null and b/src/imports/FluentUI/designer/images/frame-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/groupbox-icon.png b/src/imports/FluentUI/designer/images/groupbox-icon.png new file mode 100644 index 00000000..5542ecf8 Binary files /dev/null and b/src/imports/FluentUI/designer/images/groupbox-icon.png differ diff --git a/src/imports/FluentUI/designer/images/groupbox-icon16.png b/src/imports/FluentUI/designer/images/groupbox-icon16.png new file mode 100644 index 00000000..9cf43248 Binary files /dev/null and b/src/imports/FluentUI/designer/images/groupbox-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/groupbox-icon@2x.png b/src/imports/FluentUI/designer/images/groupbox-icon@2x.png new file mode 100644 index 00000000..80dab3c7 Binary files /dev/null and b/src/imports/FluentUI/designer/images/groupbox-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/itemdelegate-icon.png b/src/imports/FluentUI/designer/images/itemdelegate-icon.png new file mode 100644 index 00000000..822cf3e7 Binary files /dev/null and b/src/imports/FluentUI/designer/images/itemdelegate-icon.png differ diff --git a/src/imports/FluentUI/designer/images/itemdelegate-icon16.png b/src/imports/FluentUI/designer/images/itemdelegate-icon16.png new file mode 100644 index 00000000..b3ed007a Binary files /dev/null and b/src/imports/FluentUI/designer/images/itemdelegate-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/itemdelegate-icon@2x.png b/src/imports/FluentUI/designer/images/itemdelegate-icon@2x.png new file mode 100644 index 00000000..cb81308f Binary files /dev/null and b/src/imports/FluentUI/designer/images/itemdelegate-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/label-icon.png b/src/imports/FluentUI/designer/images/label-icon.png new file mode 100644 index 00000000..788bef07 Binary files /dev/null and b/src/imports/FluentUI/designer/images/label-icon.png differ diff --git a/src/imports/FluentUI/designer/images/label-icon16.png b/src/imports/FluentUI/designer/images/label-icon16.png new file mode 100644 index 00000000..b68d3845 Binary files /dev/null and b/src/imports/FluentUI/designer/images/label-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/label-icon@2x.png b/src/imports/FluentUI/designer/images/label-icon@2x.png new file mode 100644 index 00000000..7001413d Binary files /dev/null and b/src/imports/FluentUI/designer/images/label-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/page-icon.png b/src/imports/FluentUI/designer/images/page-icon.png new file mode 100644 index 00000000..b5ac87e8 Binary files /dev/null and b/src/imports/FluentUI/designer/images/page-icon.png differ diff --git a/src/imports/FluentUI/designer/images/page-icon16.png b/src/imports/FluentUI/designer/images/page-icon16.png new file mode 100644 index 00000000..bc6810b6 Binary files /dev/null and b/src/imports/FluentUI/designer/images/page-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/page-icon@2x.png b/src/imports/FluentUI/designer/images/page-icon@2x.png new file mode 100644 index 00000000..23db032f Binary files /dev/null and b/src/imports/FluentUI/designer/images/page-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/pageindicator-icon.png b/src/imports/FluentUI/designer/images/pageindicator-icon.png new file mode 100644 index 00000000..edb6b377 Binary files /dev/null and b/src/imports/FluentUI/designer/images/pageindicator-icon.png differ diff --git a/src/imports/FluentUI/designer/images/pageindicator-icon16.png b/src/imports/FluentUI/designer/images/pageindicator-icon16.png new file mode 100644 index 00000000..0fb89675 Binary files /dev/null and b/src/imports/FluentUI/designer/images/pageindicator-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/pageindicator-icon@2x.png b/src/imports/FluentUI/designer/images/pageindicator-icon@2x.png new file mode 100644 index 00000000..7be0ee81 Binary files /dev/null and b/src/imports/FluentUI/designer/images/pageindicator-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/pane-icon.png b/src/imports/FluentUI/designer/images/pane-icon.png new file mode 100644 index 00000000..62ebe487 Binary files /dev/null and b/src/imports/FluentUI/designer/images/pane-icon.png differ diff --git a/src/imports/FluentUI/designer/images/pane-icon16.png b/src/imports/FluentUI/designer/images/pane-icon16.png new file mode 100644 index 00000000..2b804844 Binary files /dev/null and b/src/imports/FluentUI/designer/images/pane-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/pane-icon@2x.png b/src/imports/FluentUI/designer/images/pane-icon@2x.png new file mode 100644 index 00000000..55bb116a Binary files /dev/null and b/src/imports/FluentUI/designer/images/pane-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/progressbar-icon.png b/src/imports/FluentUI/designer/images/progressbar-icon.png new file mode 100644 index 00000000..a023f73c Binary files /dev/null and b/src/imports/FluentUI/designer/images/progressbar-icon.png differ diff --git a/src/imports/FluentUI/designer/images/progressbar-icon16.png b/src/imports/FluentUI/designer/images/progressbar-icon16.png new file mode 100644 index 00000000..6fede21d Binary files /dev/null and b/src/imports/FluentUI/designer/images/progressbar-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/progressbar-icon@2x.png b/src/imports/FluentUI/designer/images/progressbar-icon@2x.png new file mode 100644 index 00000000..00694003 Binary files /dev/null and b/src/imports/FluentUI/designer/images/progressbar-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/radiobutton-icon.png b/src/imports/FluentUI/designer/images/radiobutton-icon.png new file mode 100644 index 00000000..d38170e2 Binary files /dev/null and b/src/imports/FluentUI/designer/images/radiobutton-icon.png differ diff --git a/src/imports/FluentUI/designer/images/radiobutton-icon16.png b/src/imports/FluentUI/designer/images/radiobutton-icon16.png new file mode 100644 index 00000000..07b46a8a Binary files /dev/null and b/src/imports/FluentUI/designer/images/radiobutton-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/radiobutton-icon@2x.png b/src/imports/FluentUI/designer/images/radiobutton-icon@2x.png new file mode 100644 index 00000000..4bbddda4 Binary files /dev/null and b/src/imports/FluentUI/designer/images/radiobutton-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/rangeslider-icon.png b/src/imports/FluentUI/designer/images/rangeslider-icon.png new file mode 100644 index 00000000..1c4c7b29 Binary files /dev/null and b/src/imports/FluentUI/designer/images/rangeslider-icon.png differ diff --git a/src/imports/FluentUI/designer/images/rangeslider-icon16.png b/src/imports/FluentUI/designer/images/rangeslider-icon16.png new file mode 100644 index 00000000..3be4624d Binary files /dev/null and b/src/imports/FluentUI/designer/images/rangeslider-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/rangeslider-icon@2x.png b/src/imports/FluentUI/designer/images/rangeslider-icon@2x.png new file mode 100644 index 00000000..aee69b33 Binary files /dev/null and b/src/imports/FluentUI/designer/images/rangeslider-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/roundbutton-icon.png b/src/imports/FluentUI/designer/images/roundbutton-icon.png new file mode 100644 index 00000000..d4b470dc Binary files /dev/null and b/src/imports/FluentUI/designer/images/roundbutton-icon.png differ diff --git a/src/imports/FluentUI/designer/images/roundbutton-icon16.png b/src/imports/FluentUI/designer/images/roundbutton-icon16.png new file mode 100644 index 00000000..f6f36666 Binary files /dev/null and b/src/imports/FluentUI/designer/images/roundbutton-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/roundbutton-icon@2x.png b/src/imports/FluentUI/designer/images/roundbutton-icon@2x.png new file mode 100644 index 00000000..4553e165 Binary files /dev/null and b/src/imports/FluentUI/designer/images/roundbutton-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/scrollview-icon.png b/src/imports/FluentUI/designer/images/scrollview-icon.png new file mode 100644 index 00000000..5ef73ff1 Binary files /dev/null and b/src/imports/FluentUI/designer/images/scrollview-icon.png differ diff --git a/src/imports/FluentUI/designer/images/scrollview-icon16.png b/src/imports/FluentUI/designer/images/scrollview-icon16.png new file mode 100644 index 00000000..f8ca7a36 Binary files /dev/null and b/src/imports/FluentUI/designer/images/scrollview-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/scrollview-icon@2x.png b/src/imports/FluentUI/designer/images/scrollview-icon@2x.png new file mode 100644 index 00000000..0eb7f966 Binary files /dev/null and b/src/imports/FluentUI/designer/images/scrollview-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/slider-icon.png b/src/imports/FluentUI/designer/images/slider-icon.png new file mode 100644 index 00000000..bd0a9729 Binary files /dev/null and b/src/imports/FluentUI/designer/images/slider-icon.png differ diff --git a/src/imports/FluentUI/designer/images/slider-icon16.png b/src/imports/FluentUI/designer/images/slider-icon16.png new file mode 100644 index 00000000..a08622df Binary files /dev/null and b/src/imports/FluentUI/designer/images/slider-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/slider-icon@2x.png b/src/imports/FluentUI/designer/images/slider-icon@2x.png new file mode 100644 index 00000000..93842e4c Binary files /dev/null and b/src/imports/FluentUI/designer/images/slider-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/spinbox-icon.png b/src/imports/FluentUI/designer/images/spinbox-icon.png new file mode 100644 index 00000000..37277c5e Binary files /dev/null and b/src/imports/FluentUI/designer/images/spinbox-icon.png differ diff --git a/src/imports/FluentUI/designer/images/spinbox-icon16.png b/src/imports/FluentUI/designer/images/spinbox-icon16.png new file mode 100644 index 00000000..f88711dd Binary files /dev/null and b/src/imports/FluentUI/designer/images/spinbox-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/spinbox-icon@2x.png b/src/imports/FluentUI/designer/images/spinbox-icon@2x.png new file mode 100644 index 00000000..b62a3bad Binary files /dev/null and b/src/imports/FluentUI/designer/images/spinbox-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/stackview-icon.png b/src/imports/FluentUI/designer/images/stackview-icon.png new file mode 100644 index 00000000..a6ced349 Binary files /dev/null and b/src/imports/FluentUI/designer/images/stackview-icon.png differ diff --git a/src/imports/FluentUI/designer/images/stackview-icon16.png b/src/imports/FluentUI/designer/images/stackview-icon16.png new file mode 100644 index 00000000..0f19d0ef Binary files /dev/null and b/src/imports/FluentUI/designer/images/stackview-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/stackview-icon@2x.png b/src/imports/FluentUI/designer/images/stackview-icon@2x.png new file mode 100644 index 00000000..9b5ef951 Binary files /dev/null and b/src/imports/FluentUI/designer/images/stackview-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/swipeview-icon.png b/src/imports/FluentUI/designer/images/swipeview-icon.png new file mode 100644 index 00000000..031cb27c Binary files /dev/null and b/src/imports/FluentUI/designer/images/swipeview-icon.png differ diff --git a/src/imports/FluentUI/designer/images/swipeview-icon16.png b/src/imports/FluentUI/designer/images/swipeview-icon16.png new file mode 100644 index 00000000..446c4696 Binary files /dev/null and b/src/imports/FluentUI/designer/images/swipeview-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/swipeview-icon@2x.png b/src/imports/FluentUI/designer/images/swipeview-icon@2x.png new file mode 100644 index 00000000..0ccb978c Binary files /dev/null and b/src/imports/FluentUI/designer/images/swipeview-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/switch-icon.png b/src/imports/FluentUI/designer/images/switch-icon.png new file mode 100644 index 00000000..e0181592 Binary files /dev/null and b/src/imports/FluentUI/designer/images/switch-icon.png differ diff --git a/src/imports/FluentUI/designer/images/switch-icon16.png b/src/imports/FluentUI/designer/images/switch-icon16.png new file mode 100644 index 00000000..9abd2756 Binary files /dev/null and b/src/imports/FluentUI/designer/images/switch-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/switch-icon@2x.png b/src/imports/FluentUI/designer/images/switch-icon@2x.png new file mode 100644 index 00000000..787f54ca Binary files /dev/null and b/src/imports/FluentUI/designer/images/switch-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/textarea-icon.png b/src/imports/FluentUI/designer/images/textarea-icon.png new file mode 100644 index 00000000..f1b2dc0f Binary files /dev/null and b/src/imports/FluentUI/designer/images/textarea-icon.png differ diff --git a/src/imports/FluentUI/designer/images/textarea-icon16.png b/src/imports/FluentUI/designer/images/textarea-icon16.png new file mode 100644 index 00000000..4afc1fba Binary files /dev/null and b/src/imports/FluentUI/designer/images/textarea-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/textarea-icon@2x.png b/src/imports/FluentUI/designer/images/textarea-icon@2x.png new file mode 100644 index 00000000..c32ecc71 Binary files /dev/null and b/src/imports/FluentUI/designer/images/textarea-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/textfield-icon.png b/src/imports/FluentUI/designer/images/textfield-icon.png new file mode 100644 index 00000000..ba5537ac Binary files /dev/null and b/src/imports/FluentUI/designer/images/textfield-icon.png differ diff --git a/src/imports/FluentUI/designer/images/textfield-icon16.png b/src/imports/FluentUI/designer/images/textfield-icon16.png new file mode 100644 index 00000000..c4a62a65 Binary files /dev/null and b/src/imports/FluentUI/designer/images/textfield-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/textfield-icon@2x.png b/src/imports/FluentUI/designer/images/textfield-icon@2x.png new file mode 100644 index 00000000..e05fd41b Binary files /dev/null and b/src/imports/FluentUI/designer/images/textfield-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/toolbar-icon.png b/src/imports/FluentUI/designer/images/toolbar-icon.png new file mode 100644 index 00000000..5cb5b2e1 Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbar-icon.png differ diff --git a/src/imports/FluentUI/designer/images/toolbar-icon16.png b/src/imports/FluentUI/designer/images/toolbar-icon16.png new file mode 100644 index 00000000..569373af Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbar-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/toolbar-icon@2x.png b/src/imports/FluentUI/designer/images/toolbar-icon@2x.png new file mode 100644 index 00000000..fd9e6cee Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbar-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/toolbutton-icon.png b/src/imports/FluentUI/designer/images/toolbutton-icon.png new file mode 100644 index 00000000..3298f695 Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbutton-icon.png differ diff --git a/src/imports/FluentUI/designer/images/toolbutton-icon16.png b/src/imports/FluentUI/designer/images/toolbutton-icon16.png new file mode 100644 index 00000000..9ab7861c Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbutton-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/toolbutton-icon@2x.png b/src/imports/FluentUI/designer/images/toolbutton-icon@2x.png new file mode 100644 index 00000000..e5958cde Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolbutton-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/toolseparator-icon.png b/src/imports/FluentUI/designer/images/toolseparator-icon.png new file mode 100644 index 00000000..5e99f06f Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolseparator-icon.png differ diff --git a/src/imports/FluentUI/designer/images/toolseparator-icon16.png b/src/imports/FluentUI/designer/images/toolseparator-icon16.png new file mode 100644 index 00000000..68f22c5d Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolseparator-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/toolseparator-icon@2x.png b/src/imports/FluentUI/designer/images/toolseparator-icon@2x.png new file mode 100644 index 00000000..549c11c6 Binary files /dev/null and b/src/imports/FluentUI/designer/images/toolseparator-icon@2x.png differ diff --git a/src/imports/FluentUI/designer/images/tumbler-icon.png b/src/imports/FluentUI/designer/images/tumbler-icon.png new file mode 100644 index 00000000..98eb8232 Binary files /dev/null and b/src/imports/FluentUI/designer/images/tumbler-icon.png differ diff --git a/src/imports/FluentUI/designer/images/tumbler-icon16.png b/src/imports/FluentUI/designer/images/tumbler-icon16.png new file mode 100644 index 00000000..ff5f95cf Binary files /dev/null and b/src/imports/FluentUI/designer/images/tumbler-icon16.png differ diff --git a/src/imports/FluentUI/designer/images/tumbler-icon@2x.png b/src/imports/FluentUI/designer/images/tumbler-icon@2x.png new file mode 100644 index 00000000..236abf0c Binary files /dev/null and b/src/imports/FluentUI/designer/images/tumbler-icon@2x.png differ