mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-28 14:16:39 +08:00
修复 FluPivot 的 header 选中项未高亮显示问题
This commit is contained in:
parent
8ab0cde2e9
commit
d75ecfeca7
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user