From 9ff81251c88903b01f64c31950388cdda83774fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 1 Jul 2023 07:54:43 +0800 Subject: [PATCH] update --- example/CMakeLists.txt | 2 +- example/qml/page/T_TableView.qml | 4 ++-- example/qml/page/T_TextBox.qml | 2 +- example/qml/window/MainWindow.qml | 2 +- src/CMakeLists.txt | 2 +- .../FluentUI/Controls/FluNavigationView.qml | 4 ++-- src/imports/FluentUI/Controls/FluPage.qml | 1 - src/imports/FluentUI/Controls/FluSpinBox.qml | 17 +++++++++++++++-- src/imports/FluentUI/Controls/FluTableView.qml | 2 +- 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ce8fdadf..4315785d 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -19,7 +19,7 @@ endif() file(TO_CMAKE_PATH "/" PATH_SEPARATOR) #设置版本号 -add_definitions(-DVERSION=1,3,7,1) +add_definitions(-DVERSION=1,3,7,2) find_package(Qt6 REQUIRED COMPONENTS Quick) diff --git a/example/qml/page/T_TableView.qml b/example/qml/page/T_TableView.qml index 87a3139f..fefe4ff9 100644 --- a/example/qml/page/T_TableView.qml +++ b/example/qml/page/T_TableView.qml @@ -64,8 +64,8 @@ FluContentPage{ address: getRandomAddresses(), nickname: getRandomNickname(), longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好", - height:44, - minimumHeight:44, + height:46, + minimumHeight:46, maximumHeight:300, action:com_action }) diff --git a/example/qml/page/T_TextBox.qml b/example/qml/page/T_TextBox.qml index c5ee3141..9e129a30 100644 --- a/example/qml/page/T_TextBox.qml +++ b/example/qml/page/T_TextBox.qml @@ -174,7 +174,7 @@ FluScrollablePage{ FluSpinBox{ Layout.topMargin: 20 -// disabled: spin_box_switch.checked + disabled: spin_box_switch.checked anchors{ verticalCenter: parent.verticalCenter left: parent.left diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index 5046a084..7f6b7be6 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -180,7 +180,7 @@ CustomWindow { } } transformOrigin: Item.Center - onLoginClicked:{ + onLogoClicked:{ clickCount += 1 if(clickCount === 1){ loader.reload() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a24d548..7aea0814 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,7 +12,7 @@ endif() set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI) #设置版本号 -add_definitions(-DVERSION=1,3,7,1) +add_definitions(-DVERSION=1,3,7,2) find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml) diff --git a/src/imports/FluentUI/Controls/FluNavigationView.qml b/src/imports/FluentUI/Controls/FluNavigationView.qml index 28e269f5..412afaeb 100644 --- a/src/imports/FluentUI/Controls/FluNavigationView.qml +++ b/src/imports/FluentUI/Controls/FluNavigationView.qml @@ -27,7 +27,7 @@ Item { property Component autoSuggestBox property Component actionItem property int topPadding: 0 - signal loginClicked + signal logoClicked id:control QtObject{ id:d @@ -584,7 +584,7 @@ Item { MouseArea{ anchors.fill: parent onClicked: { - loginClicked() + logoClicked() } } } diff --git a/src/imports/FluentUI/Controls/FluPage.qml b/src/imports/FluentUI/Controls/FluPage.qml index b647ccaf..262341c4 100644 --- a/src/imports/FluentUI/Controls/FluPage.qml +++ b/src/imports/FluentUI/Controls/FluPage.qml @@ -18,5 +18,4 @@ Item { Component.onCompleted: { visible = true } - } diff --git a/src/imports/FluentUI/Controls/FluSpinBox.qml b/src/imports/FluentUI/Controls/FluSpinBox.qml index 31a21710..4e7a8ff0 100644 --- a/src/imports/FluentUI/Controls/FluSpinBox.qml +++ b/src/imports/FluentUI/Controls/FluSpinBox.qml @@ -5,6 +5,7 @@ import FluentUI Rectangle{ readonly property string displayText : d._displayText + property bool disabled: false property int from: 0 property int to: 99 property var validator: IntValidator { @@ -27,6 +28,7 @@ Rectangle{ FluTextBox{ rightPadding: 80 closeRightMargin: 55 + disabled: control.disabled validator: control.validator text: d._displayText Component.onCompleted: { @@ -51,6 +53,7 @@ Rectangle{ anchors.fill: parent readOnly: true rightPadding: 80 + disabled: control.disabled text: control.displayText MouseArea{ anchors.fill: parent @@ -68,8 +71,13 @@ Rectangle{ width: 20 height: 20 iconSize: 16 + disabled: { + if(control.disabled===true){ + return true + } + return Number(control.displayText) === control.to + } iconSource: FluentIcons.ChevronUp - enabled: Number(control.displayText) !== control.to anchors{ verticalCenter: parent.verticalCenter right: parent.right @@ -102,8 +110,13 @@ Rectangle{ iconSource: FluentIcons.ChevronDown width: 20 height: 20 + disabled: { + if(control.disabled === true){ + return true + } + return Number(control.displayText) === control.from + } iconSize: 16 - enabled: Number(control.displayText) !== control.from anchors{ verticalCenter: parent.verticalCenter right: parent.right diff --git a/src/imports/FluentUI/Controls/FluTableView.qml b/src/imports/FluentUI/Controls/FluTableView.qml index 86a65e83..509d2f50 100644 --- a/src/imports/FluentUI/Controls/FluTableView.qml +++ b/src/imports/FluentUI/Controls/FluTableView.qml @@ -452,7 +452,7 @@ Rectangle { var minimumHeight = obj.minimumHeight var maximumHeight = obj.maximumHeight if(!minimumHeight){ - minimumHeight = 44 + minimumHeight = 46 } if(!maximumHeight){ maximumHeight = 65535