dashboard: fill current tab icon
This commit is contained in:
parent
6de0288b70
commit
d7a2488081
1 changed files with 13 additions and 0 deletions
|
|
@ -84,6 +84,7 @@ Item {
|
||||||
|
|
||||||
required property string iconName
|
required property string iconName
|
||||||
readonly property bool current: TabBar.tabBar.currentItem === this
|
readonly property bool current: TabBar.tabBar.currentItem === this
|
||||||
|
property real fill: current ? 1 : 0
|
||||||
|
|
||||||
background: null
|
background: null
|
||||||
|
|
||||||
|
|
@ -204,6 +205,9 @@ Item {
|
||||||
text: tab.iconName
|
text: tab.iconName
|
||||||
color: tab.current ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
color: tab.current ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.large
|
||||||
|
font.variableAxes: ({
|
||||||
|
FILL: tab.fill
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|
@ -215,6 +219,15 @@ Item {
|
||||||
text: tab.text
|
text: tab.text
|
||||||
color: tab.current ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
color: tab.current ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on fill {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Appearance.anim.durations.normal
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue