mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:05:53 +08:00
Change top bar text colour depending on hover and active state
Too bad we have to introduce additional theme entries for this sort of thing. Makes it harder to modify the theme! Contributes to issue CURA-4148.
This commit is contained in:
parent
5652bccc58
commit
d73bbabda9
@ -44,7 +44,7 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("tab_settings");
|
iconSource: UM.Theme.getIcon("tab_settings");
|
||||||
property color overlayColor: "transparent"
|
property color overlayColor: "transparent"
|
||||||
property string overlayIconSource: ""
|
property string overlayIconSource: ""
|
||||||
text: catalog.i18nc("@title:tab","Prepare")
|
text: catalog.i18nc("@title:tab", "Prepare")
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: !base.monitoringPrint
|
checked: !base.monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
@ -197,7 +197,7 @@ Rectangle
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: sidebarComboBoxLabel
|
id: sidebarComboBoxLabel
|
||||||
color: UM.Theme.getColor("text_reversed")
|
color: UM.Theme.getColor("sidebar_header_text_active")
|
||||||
text: control.text;
|
text: control.text;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
@ -210,7 +210,21 @@ QtObject {
|
|||||||
anchors.leftMargin: Theme.getSize("default_margin").width
|
anchors.leftMargin: Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
font: UM.Theme.getFont("large");
|
font: UM.Theme.getFont("large");
|
||||||
color: UM.Theme.getColor("text_reversed")
|
color:
|
||||||
|
{
|
||||||
|
if(control.hovered)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("sidebar_header_text_hover");
|
||||||
|
}
|
||||||
|
if(control.checked)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("sidebar_header_text_active");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("sidebar_header_text_inactive");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user