mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-28 22:26:43 +08:00
修复 FluPivot 的 header 选中项未高亮显示问题
This commit is contained in:
parent
8ab0cde2e9
commit
d75ecfeca7
@ -5,8 +5,9 @@ import FluentUI 1.0
|
|||||||
Page {
|
Page {
|
||||||
default property alias content: d.children
|
default property alias content: d.children
|
||||||
property alias currentIndex: nav_list.currentIndex
|
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 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 textSpacing: 10
|
||||||
property int headerSpacing: 20
|
property int headerSpacing: 20
|
||||||
property int headerHeight: 40
|
property int headerHeight: 40
|
||||||
@ -66,9 +67,13 @@ Page {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font: control.font
|
font: control.font
|
||||||
color: {
|
color: {
|
||||||
if(item_button.hovered)
|
if(nav_list.currentIndex === index) {
|
||||||
return textHoverColor
|
return textHighlightColor;
|
||||||
return textNormalColor
|
}
|
||||||
|
if (item_button.hovered) {
|
||||||
|
return textHoverColor;
|
||||||
|
}
|
||||||
|
return textNormalColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,9 @@ import FluentUI
|
|||||||
Page {
|
Page {
|
||||||
default property alias content: d.children
|
default property alias content: d.children
|
||||||
property alias currentIndex: nav_list.currentIndex
|
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 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 textSpacing: 10
|
||||||
property int headerSpacing: 20
|
property int headerSpacing: 20
|
||||||
property int headerHeight: 40
|
property int headerHeight: 40
|
||||||
@ -67,9 +68,13 @@ Page {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font: control.font
|
font: control.font
|
||||||
color: {
|
color: {
|
||||||
if(item_button.hovered)
|
if(nav_list.currentIndex === index) {
|
||||||
return textHoverColor
|
return textHighlightColor;
|
||||||
return textNormalColor
|
}
|
||||||
|
if (item_button.hovered) {
|
||||||
|
return textHoverColor;
|
||||||
|
}
|
||||||
|
return textNormalColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user