diff --git a/src/Qt5/imports/FluentUI/Controls/FluPivot.qml b/src/Qt5/imports/FluentUI/Controls/FluPivot.qml index 866af6b6..ce45429a 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluPivot.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluPivot.qml @@ -5,8 +5,9 @@ import FluentUI 1.0 Page { default property alias content: d.children property alias currentIndex: nav_list.currentIndex + property color textHighlightColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120 - property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black + property color textHoverColor: FluTheme.dark ? FluColors.Grey80 : FluColors.Grey150 property int textSpacing: 10 property int headerSpacing: 20 property int headerHeight: 40 @@ -66,9 +67,13 @@ Page { anchors.centerIn: parent font: control.font color: { - if(item_button.hovered) - return textHoverColor - return textNormalColor + if(nav_list.currentIndex === index) { + return textHighlightColor; + } + if (item_button.hovered) { + return textHoverColor; + } + return textNormalColor; } } } diff --git a/src/Qt6/imports/FluentUI/Controls/FluPivot.qml b/src/Qt6/imports/FluentUI/Controls/FluPivot.qml index 38a19f04..7c0a9681 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluPivot.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluPivot.qml @@ -6,8 +6,9 @@ import FluentUI Page { default property alias content: d.children property alias currentIndex: nav_list.currentIndex + property color textHighlightColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120 - property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black + property color textHoverColor: FluTheme.dark ? FluColors.Grey80 : FluColors.Grey150 property int textSpacing: 10 property int headerSpacing: 20 property int headerHeight: 40 @@ -67,9 +68,13 @@ Page { anchors.centerIn: parent font: control.font color: { - if(item_button.hovered) - return textHoverColor - return textNormalColor + if(nav_list.currentIndex === index) { + return textHighlightColor; + } + if (item_button.hovered) { + return textHoverColor; + } + return textNormalColor; } } }