mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Show hover state on active focus
This commit is contained in:
parent
8a887915ac
commit
b324e90ba5
6 changed files with 57 additions and 38 deletions
|
@ -74,7 +74,7 @@ SettingItem
|
|||
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
|
@ -82,14 +82,22 @@ SettingItem
|
|||
{
|
||||
return UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if(control.containsMouse || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
|
||||
UM.RecolorImage {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -33,21 +33,29 @@ SettingItem
|
|||
{
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
if(control.hovered || base.activeFocus)
|
||||
if(control.hovered || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if(control.hovered || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width;
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border");
|
||||
}
|
||||
label: Item
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ SettingItem
|
|||
{
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled");
|
||||
}
|
||||
|
@ -61,23 +61,19 @@ SettingItem
|
|||
{
|
||||
return UM.Theme.getColor("setting_control_highlight");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("setting_control");
|
||||
}
|
||||
return UM.Theme.getColor("setting_control");
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border");
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if(control.hovered || base.activeFocus)
|
||||
if(control.hovered || control.activeFocus)
|
||||
{
|
||||
UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,31 +72,27 @@ SettingItem
|
|||
{
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled");
|
||||
}
|
||||
if(control.hovered || base.activeFocus)
|
||||
if(control.hovered || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_highlight");
|
||||
}
|
||||
else
|
||||
{
|
||||
return UM.Theme.getColor("setting_control");
|
||||
}
|
||||
return UM.Theme.getColor("setting_control");
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border");
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if(control.hovered || base.activeFocus)
|
||||
if(control.hovered || control.activeFocus)
|
||||
{
|
||||
UM.Theme.getColor("setting_control_border_highlight")
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,10 +17,21 @@ SettingItem
|
|||
anchors.fill: parent
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
if(hovered || input.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
|
||||
color: {
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
|
|
|
@ -368,11 +368,11 @@ QtObject {
|
|||
color: {
|
||||
if(!control.enabled) {
|
||||
return Theme.getColor("setting_category_disabled_border");
|
||||
} else if(control.hovered && control.checkable && control.checked) {
|
||||
} else if((control.hovered || control.activeFocus) && control.checkable && control.checked) {
|
||||
return Theme.getColor("setting_category_active_hover_border");
|
||||
} else if(control.pressed || (control.checkable && control.checked)) {
|
||||
return Theme.getColor("setting_category_active_border");
|
||||
} else if(control.hovered) {
|
||||
} else if(control.hovered || control.activeFocus) {
|
||||
return Theme.getColor("setting_category_hover_border");
|
||||
} else {
|
||||
return Theme.getColor("setting_category_border");
|
||||
|
@ -508,7 +508,7 @@ QtObject {
|
|||
{
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue