mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 23:55:57 +08:00
Ensure bool and enum settings get control highlighted on hover
This commit is contained in:
parent
e8cd5723c9
commit
867a881de9
@ -112,7 +112,7 @@ SettingItem
|
|||||||
return UM.Theme.getColor("setting_validation_warning");
|
return UM.Theme.getColor("setting_validation_warning");
|
||||||
}
|
}
|
||||||
// Validation is OK.
|
// Validation is OK.
|
||||||
if (control.containsMouse || control.activeFocus)
|
if (control.containsMouse || control.activeFocus || hovered)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_border_highlight")
|
return UM.Theme.getColor("setting_control_border_highlight")
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ SettingItem
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
property var focusItem: control
|
property var focusItem: control
|
||||||
|
|
||||||
contents: Cura.ComboBox
|
contents: Cura.ComboBox
|
||||||
{
|
{
|
||||||
id: control
|
id: control
|
||||||
@ -21,6 +20,7 @@ SettingItem
|
|||||||
textRole: "value"
|
textRole: "value"
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
highlighted: base.hovered
|
||||||
|
|
||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ import Cura 1.1 as Cura
|
|||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: control
|
id: control
|
||||||
|
property bool highlighted: False
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
color:
|
color:
|
||||||
@ -24,7 +24,7 @@ ComboBox
|
|||||||
return UM.Theme.getColor("setting_control_disabled")
|
return UM.Theme.getColor("setting_control_disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control.hovered || control.activeFocus)
|
if (control.hovered || control.activeFocus || control.highlighted)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_highlight")
|
return UM.Theme.getColor("setting_control_highlight")
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ ComboBox
|
|||||||
return UM.Theme.getColor("setting_control_disabled_border")
|
return UM.Theme.getColor("setting_control_disabled_border")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (control.hovered || control.activeFocus)
|
if (control.hovered || control.activeFocus || control.highlighted)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_border_highlight")
|
return UM.Theme.getColor("setting_control_border_highlight")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user