From 3460b59839a8c84dcf086b164a48c84dd6abe8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 4 Nov 2023 21:46:31 +0800 Subject: [PATCH] update --- src/Qt5/imports/FluentUI/Controls/FluIconButton.qml | 5 ++++- src/Qt6/imports/FluentUI/Controls/FluIconButton.qml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml b/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml index edf70651..b9bd08b4 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluIconButton.qml @@ -37,6 +37,7 @@ Button { return Qt.rgba(0,0,0,1) } } + property color textColor: FluTheme.fontPrimaryColor Accessible.role: Accessible.Button Accessible.name: control.text Accessible.description: contentDescription @@ -80,6 +81,7 @@ Button { text:control.text Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter visible: display !== Button.IconOnly + color: control.textColor } } } @@ -95,10 +97,11 @@ Button { text:control.text Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter visible: display !== Button.IconOnly + color: control.textColor } } } - contentItem:Loader{ + contentItem:FluLoader{ sourceComponent: { if(display === Button.TextUnderIcon){ return com_column diff --git a/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml b/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml index dd72c91a..2b755475 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluIconButton.qml @@ -38,6 +38,7 @@ Button { return Qt.rgba(0,0,0,1) } } + property color textColor: FluTheme.fontPrimaryColor Accessible.role: Accessible.Button Accessible.name: control.text Accessible.description: contentDescription @@ -81,6 +82,7 @@ Button { text:control.text Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter visible: display !== Button.IconOnly + color: control.textColor } } } @@ -96,6 +98,7 @@ Button { text:control.text Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter visible: display !== Button.IconOnly + color: control.textColor } } }