From ef96618151b67e88785f230f57ecf19cbff52cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Wed, 3 Apr 2024 21:52:26 +0800 Subject: [PATCH] update --- example/qml/chart/T_BarChart.qml | 4 ++-- example/src/main.cpp | 2 +- src/FluentUI.cpp | 1 + .../imports/FluentUI/Controls/FluButton.qml | 3 +-- .../imports/FluentUI/Controls/FluComboBox.qml | 3 ++- .../Controls/FluControlBackground.qml | 24 ++++++++++++------- .../imports/FluentUI/Controls/FluExpander.qml | 6 ++--- .../imports/FluentUI/Controls/FluFrame.qml | 4 ++-- src/Qt5/imports/FluentUI/Controls/FluMenu.qml | 4 ++-- .../FluentUI/Controls/FluProgressButton.qml | 4 ++-- .../Controls/FluTextBoxBackground.qml | 2 +- .../FluentUI/Controls/FluToggleButton.qml | 12 ++++++---- src/Qt5/imports/FluentUI/qmldir | 1 + .../imports/FluentUI/Controls/FluButton.qml | 4 ++-- .../imports/FluentUI/Controls/FluComboBox.qml | 3 ++- .../Controls/FluControlBackground.qml | 24 ++++++++++++------- .../imports/FluentUI/Controls/FluExpander.qml | 6 ++--- .../imports/FluentUI/Controls/FluFrame.qml | 4 ++-- src/Qt6/imports/FluentUI/Controls/FluMenu.qml | 4 ++-- .../FluentUI/Controls/FluProgressButton.qml | 4 ++-- .../Controls/FluTextBoxBackground.qml | 2 +- .../FluentUI/Controls/FluToggleButton.qml | 7 ++---- 22 files changed, 71 insertions(+), 57 deletions(-) diff --git a/example/qml/chart/T_BarChart.qml b/example/qml/chart/T_BarChart.qml index a57b81ab..c7c0cb2d 100644 --- a/example/qml/chart/T_BarChart.qml +++ b/example/qml/chart/T_BarChart.qml @@ -70,8 +70,8 @@ FluScrollablePage{ } FluFrame{ - width: 500 - height: 370 + Layout.preferredWidth: 500 + Layout.preferredHeight: 370 padding: 10 Layout.topMargin: 20 FluChart{ diff --git a/example/src/main.cpp b/example/src/main.cpp index ce258e27..ca39b245 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -33,7 +33,7 @@ Q_IMPORT_QML_PLUGIN(FluentUIPlugin) int main(int argc, char *argv[]) { #ifdef WIN32 - ::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter); +// ::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter); qputenv("QT_QPA_PLATFORM","windows:darkmode=2"); #endif #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) diff --git a/src/FluentUI.cpp b/src/FluentUI.cpp index 36ed7472..adfe36de 100644 --- a/src/FluentUI.cpp +++ b/src/FluentUI.cpp @@ -126,6 +126,7 @@ void FluentUI::registerTypes(const char *uri){ qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEvent.qml"),uri,major,minor,"FluEvent"); qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSheet.qml"),uri,major,minor,"FluSheet"); qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluGroupBox.qml"),uri,major,minor,"FluGroupBox"); + qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluControlBackground.qml"),uri,major,minor,"FluControlBackground"); qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRouter.qml"),uri,major,minor,"FluRouter"); qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEventBus.qml"),uri,major,minor,"FluEventBus"); diff --git a/src/Qt5/imports/FluentUI/Controls/FluButton.qml b/src/Qt5/imports/FluentUI/Controls/FluButton.qml index 97f71452..499ed8be 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluButton.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluButton.qml @@ -48,8 +48,7 @@ Button { } return hovered ? hoverColor :normalColor } - shadow: enabled - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + shadow: !pressed && enabled FluFocusRectangle{ visible: control.activeFocus radius:4 diff --git a/src/Qt5/imports/FluentUI/Controls/FluComboBox.qml b/src/Qt5/imports/FluentUI/Controls/FluComboBox.qml index 382e7c86..6763690a 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluComboBox.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluComboBox.qml @@ -67,7 +67,8 @@ T.ComboBox { bottomInset:1 rightInset:1 background: FluTextBoxBackground{ - borderWidth: 0 + border.width: 0 + bottomMargin: 0 inputItem: contentItem } Component.onCompleted: { diff --git a/src/Qt5/imports/FluentUI/Controls/FluControlBackground.qml b/src/Qt5/imports/FluentUI/Controls/FluControlBackground.qml index 017a0e9b..30c79c60 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluControlBackground.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluControlBackground.qml @@ -7,18 +7,18 @@ Item{ property int radius: 4 property bool shadow: true property alias border: d.border - property alias bottomMargin: rect_back.anchors.bottomMargin - property alias topMargin: rect_back.anchors.topMargin - property alias leftMargin: rect_back.anchors.leftMargin - property alias rightMargin: rect_back.anchors.rightMargin + property var bottomMargin: undefined + property var topMargin: undefined + property var leftMargin: undefined + property var rightMargin: undefined property color color: FluTheme.dark ? Qt.rgba(42/255,42/255,42/255,1) : Qt.rgba(254/255,254/255,254/255,1) property alias gradient : rect_border.gradient Rectangle{ id:d - property color startColor: Qt.lighter(d.border.color,1.15) + property color startColor: Qt.lighter(d.border.color,1.25) property color endColor: shadow ? control.border.color : startColor visible: false - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) } Rectangle{ id:rect_border @@ -26,14 +26,20 @@ Item{ radius: control.radius gradient: Gradient { GradientStop { position: 0.0; color: d.startColor } - GradientStop { position: 0.8; color: d.startColor } + GradientStop { position: 0.88; color: d.startColor } GradientStop { position: 1.0; color: d.endColor} } } Rectangle{ id:rect_back - anchors.fill: parent - anchors.margins: control.border.width + anchors{ + fill: parent + margins: control.border.width + topMargin: control.topMargin + bottomMargin: control.bottomMargin + leftMargin: control.leftMargin + rightMargin: control.rightMargin + } radius: control.radius color: control.color } diff --git a/src/Qt5/imports/FluentUI/Controls/FluExpander.qml b/src/Qt5/imports/FluentUI/Controls/FluExpander.qml index e5a616c1..d43d9991 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluExpander.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluExpander.qml @@ -26,8 +26,8 @@ Item { width: parent.width height: 45 radius: 4 - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - color: FluTheme.dark ? Window.active ? Qt.rgba(28/255,28/255,28/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + border.color: FluTheme.dividerColor + color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) MouseArea{ id:control_mouse anchors.fill: parent @@ -90,7 +90,7 @@ Item { radius: 4 clip: true color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) - border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) + border.color: FluTheme.dividerColor anchors.topMargin: -contentHeight states: [ State{ diff --git a/src/Qt5/imports/FluentUI/Controls/FluFrame.qml b/src/Qt5/imports/FluentUI/Controls/FluFrame.qml index b4154d90..963b2af0 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluFrame.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluFrame.qml @@ -18,7 +18,7 @@ T.Frame { background: Rectangle { id:d radius: 4 - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - color: FluTheme.dark ? Window.active ? Qt.rgba(28/255,28/255,28/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + border.color: FluTheme.dividerColor + color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(251/255,251/255,253/255,1) } } diff --git a/src/Qt5/imports/FluentUI/Controls/FluMenu.qml b/src/Qt5/imports/FluentUI/Controls/FluMenu.qml index 5af492a1..332bce1c 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluMenu.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluMenu.qml @@ -51,9 +51,9 @@ T.Menu { FluShadow{} } T.Overlay.modal: Rectangle { - color: FluTools.colorAlpha(control.palette.shadow, 0.5) + color: FluTools.withOpacity(control.palette.shadow, 0.5) } T.Overlay.modeless: Rectangle { - color: FluTools.colorAlpha(control.palette.shadow, 0.12) + color: FluTools.withOpacity(control.palette.shadow, 0.12) } } diff --git a/src/Qt5/imports/FluentUI/Controls/FluProgressButton.qml b/src/Qt5/imports/FluentUI/Controls/FluProgressButton.qml index 5eb60ccc..bcfc3f81 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluProgressButton.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluProgressButton.qml @@ -6,7 +6,7 @@ FluButton { property real progress QtObject{ id:d - property bool checked: (rect_back.height === background.height) && (progress === 1) + property bool checked: (Number(rect_back.height) === Number(background.height)) && (progress === 1) } id: control property color normalColor: { @@ -35,7 +35,7 @@ FluButton { implicitWidth: 30 implicitHeight: 30 radius: 4 - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) border.width: d.checked ? 0 : 1 color:{ if(!enabled){ diff --git a/src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml b/src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml index bc8fc365..ea626588 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml @@ -26,7 +26,7 @@ FluControlBackground{ bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1 QtObject{ id:d - property color startColor: FluTheme.dark ? Qt.rgba(23/255,23/255,23/255,1) : Qt.rgba(232/255,232/255,232/255,1) + property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1) property color endColor: { if(!control.enabled){ return d.startColor diff --git a/src/Qt5/imports/FluentUI/Controls/FluToggleButton.qml b/src/Qt5/imports/FluentUI/Controls/FluToggleButton.qml index 06242d0b..9d00a975 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluToggleButton.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluToggleButton.qml @@ -39,6 +39,11 @@ Button { enabled: !disabled verticalPadding: 0 horizontalPadding:12 + onCheckableChanged: { + if(checkable){ + checkable = false + } + } onClicked: clickListener() background: FluControlBackground{ implicitWidth: 30 @@ -77,19 +82,16 @@ Button { if(checked){ return true }else{ - return enabled + return !pressed && enabled } } border.color: { if(checked){ return enabled ? Qt.darker(control.normalColor,1.2) : disableColor }else{ - return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) } } - - - } contentItem: FluText { text: control.text diff --git a/src/Qt5/imports/FluentUI/qmldir b/src/Qt5/imports/FluentUI/qmldir index a8a4c0c4..fc12b266 100644 --- a/src/Qt5/imports/FluentUI/qmldir +++ b/src/Qt5/imports/FluentUI/qmldir @@ -19,6 +19,7 @@ FluComboBox 1.0 Controls/FluComboBox.qml FluContentDialog 1.0 Controls/FluContentDialog.qml FluContentPage 1.0 Controls/FluContentPage.qml FluControl 1.0 Controls/FluControl.qml +FluControlBackground 1.0 Controls/FluControlBackground.qml FluCopyableText 1.0 Controls/FluCopyableText.qml FluDatePicker 1.0 Controls/FluDatePicker.qml FluDivider 1.0 Controls/FluDivider.qml diff --git a/src/Qt6/imports/FluentUI/Controls/FluButton.qml b/src/Qt6/imports/FluentUI/Controls/FluButton.qml index e968e000..4dcd8bd9 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluButton.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluButton.qml @@ -3,6 +3,7 @@ import QtQuick.Controls import QtQuick.Controls.Basic import FluentUI + Button { property bool disabled: false property string contentDescription: "" @@ -49,8 +50,7 @@ Button { } return hovered ? hoverColor :normalColor } - shadow: enabled - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + shadow: !pressed && enabled FluFocusRectangle{ visible: control.activeFocus radius:4 diff --git a/src/Qt6/imports/FluentUI/Controls/FluComboBox.qml b/src/Qt6/imports/FluentUI/Controls/FluComboBox.qml index d78943b4..a510b177 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluComboBox.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluComboBox.qml @@ -67,7 +67,8 @@ T.ComboBox { bottomInset:1 rightInset:1 background: FluTextBoxBackground{ - borderWidth: 0 + border.width: 0 + bottomMargin: 0 inputItem: contentItem } Component.onCompleted: { diff --git a/src/Qt6/imports/FluentUI/Controls/FluControlBackground.qml b/src/Qt6/imports/FluentUI/Controls/FluControlBackground.qml index 7c491758..3a91d3f3 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluControlBackground.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluControlBackground.qml @@ -7,18 +7,18 @@ Item{ property int radius: 4 property bool shadow: true property alias border: d.border - property alias bottomMargin: rect_back.anchors.bottomMargin - property alias topMargin: rect_back.anchors.topMargin - property alias leftMargin: rect_back.anchors.leftMargin - property alias rightMargin: rect_back.anchors.rightMargin + property var bottomMargin: undefined + property var topMargin: undefined + property var leftMargin: undefined + property var rightMargin: undefined property color color: FluTheme.dark ? Qt.rgba(42/255,42/255,42/255,1) : Qt.rgba(254/255,254/255,254/255,1) property alias gradient : rect_border.gradient Rectangle{ id:d - property color startColor: Qt.lighter(d.border.color,1.15) + property color startColor: Qt.lighter(d.border.color,1.25) property color endColor: shadow ? control.border.color : startColor visible: false - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) } Rectangle{ id:rect_border @@ -26,14 +26,20 @@ Item{ radius: control.radius gradient: Gradient { GradientStop { position: 0.0; color: d.startColor } - GradientStop { position: 0.8; color: d.startColor } + GradientStop { position: 0.88; color: d.startColor } GradientStop { position: 1.0; color: d.endColor} } } Rectangle{ id:rect_back - anchors.fill: parent - anchors.margins: control.border.width + anchors{ + fill: parent + margins: control.border.width + topMargin: control.topMargin + bottomMargin: control.bottomMargin + leftMargin: control.leftMargin + rightMargin: control.rightMargin + } radius: control.radius color: control.color } diff --git a/src/Qt6/imports/FluentUI/Controls/FluExpander.qml b/src/Qt6/imports/FluentUI/Controls/FluExpander.qml index 29c47de7..24018e34 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluExpander.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluExpander.qml @@ -26,8 +26,8 @@ Item { width: parent.width height: 45 radius: 4 - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - color: FluTheme.dark ? Window.active ? Qt.rgba(28/255,28/255,28/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + border.color: FluTheme.dividerColor + color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) MouseArea{ id:control_mouse anchors.fill: parent @@ -90,7 +90,7 @@ Item { radius: 4 clip: true color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) - border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) + border.color: FluTheme.dividerColor anchors.topMargin: -contentHeight states: [ State{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluFrame.qml b/src/Qt6/imports/FluentUI/Controls/FluFrame.qml index a7de935c..f830d529 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluFrame.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluFrame.qml @@ -16,7 +16,7 @@ T.Frame { background: Rectangle { id:d radius: 4 - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - color: FluTheme.dark ? Window.active ? Qt.rgba(28/255,28/255,28/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + border.color: FluTheme.dividerColor + color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(251/255,251/255,253/255,1) } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluMenu.qml b/src/Qt6/imports/FluentUI/Controls/FluMenu.qml index f9afab12..92dd2e7d 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluMenu.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluMenu.qml @@ -51,9 +51,9 @@ T.Menu { FluShadow{} } T.Overlay.modal: Rectangle { - color: Color.transparent(control.palette.shadow, 0.5) + color: FluTools.withOpacity(control.palette.shadow, 0.5) } T.Overlay.modeless: Rectangle { - color: Color.transparent(control.palette.shadow, 0.12) + color: FluTools.withOpacity(control.palette.shadow, 0.12) } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluProgressButton.qml b/src/Qt6/imports/FluentUI/Controls/FluProgressButton.qml index 50faaf70..41d09353 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluProgressButton.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluProgressButton.qml @@ -7,7 +7,7 @@ FluButton { property real progress QtObject{ id:d - property bool checked: (rect_back.height === background.height) && (progress === 1) + property bool checked: (Number(rect_back.height) === Number(background.height)) && (progress === 1) } id: control property color normalColor: { @@ -36,7 +36,7 @@ FluButton { implicitWidth: 30 implicitHeight: 30 radius: 4 - border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) border.width: d.checked ? 0 : 1 color:{ if(!enabled){ diff --git a/src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml b/src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml index c362a97b..7953fe4d 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml @@ -26,7 +26,7 @@ FluControlBackground{ bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1 QtObject{ id:d - property color startColor: FluTheme.dark ? Qt.rgba(23/255,23/255,23/255,1) : Qt.rgba(232/255,232/255,232/255,1) + property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1) property color endColor: { if(!control.enabled){ return d.startColor diff --git a/src/Qt6/imports/FluentUI/Controls/FluToggleButton.qml b/src/Qt6/imports/FluentUI/Controls/FluToggleButton.qml index 2f81b54c..34f5faaa 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluToggleButton.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluToggleButton.qml @@ -78,19 +78,16 @@ Button { if(checked){ return true }else{ - return enabled + return !pressed && enabled } } border.color: { if(checked){ return enabled ? Qt.darker(control.normalColor,1.2) : disableColor }else{ - return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(206/255,206/255,206/255,1) + return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1) } } - - - } contentItem: FluText { text: control.text