mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 20:31:35 -07:00
Tweak disabled appearance
This commit is contained in:
parent
a9f2ad7ca3
commit
46fc478f9d
1 changed files with 51 additions and 21 deletions
|
|
@ -924,12 +924,38 @@ Column
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width
|
border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width
|
||||||
border.color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_border") :
|
border.color:
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_border") :
|
{
|
||||||
UM.Theme.getColor("action_button_border")
|
if(!control.enabled)
|
||||||
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active") :
|
{
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered") :
|
return UM.Theme.getColor("action_button_disabled_border");
|
||||||
UM.Theme.getColor("action_button")
|
}
|
||||||
|
else if (control.checked || control.pressed)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_active_border");
|
||||||
|
}
|
||||||
|
else if(control.hovered)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_hovered_border");
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("action_button_border");
|
||||||
|
}
|
||||||
|
color:
|
||||||
|
{
|
||||||
|
if(!control.enabled)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_disabled");
|
||||||
|
}
|
||||||
|
else if (control.checked || control.pressed)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_active");
|
||||||
|
}
|
||||||
|
else if (control.hovered)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_hovered");
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("action_button");
|
||||||
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
Label {
|
Label {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
@ -937,9 +963,22 @@ Column
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2
|
anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2
|
anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
color:
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
{
|
||||||
UM.Theme.getColor("action_button_text")
|
if(!control.enabled)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_disabled_text");
|
||||||
|
}
|
||||||
|
else if (control.checked || control.pressed)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_active_text");
|
||||||
|
}
|
||||||
|
else if (control.hovered)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("action_button_hovered_text");
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("action_button_text");
|
||||||
|
}
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
text: control.text
|
text: control.text
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
@ -1066,10 +1105,7 @@ Column
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("action_button_hovered_border");
|
return UM.Theme.getColor("action_button_hovered_border");
|
||||||
}
|
}
|
||||||
else
|
return UM.Theme.getColor("action_button_border");
|
||||||
{
|
|
||||||
return UM.Theme.getColor("action_button_border");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
|
|
@ -1085,10 +1121,7 @@ Column
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("action_button_hovered");
|
return UM.Theme.getColor("action_button_hovered");
|
||||||
}
|
}
|
||||||
else
|
return UM.Theme.getColor("action_button");
|
||||||
{
|
|
||||||
return UM.Theme.getColor("action_button");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Behavior on color
|
Behavior on color
|
||||||
{
|
{
|
||||||
|
|
@ -1123,10 +1156,7 @@ Column
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("action_button_hovered_text");
|
return UM.Theme.getColor("action_button_hovered_text");
|
||||||
}
|
}
|
||||||
else
|
return UM.Theme.getColor("action_button_text");
|
||||||
{
|
|
||||||
return UM.Theme.getColor("action_button_text");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
source: control.iconSource
|
source: control.iconSource
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue