From 867a881de91deb017fb05518113ed975c0246397 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 27 Aug 2019 13:38:55 +0200 Subject: [PATCH] Ensure bool and enum settings get control highlighted on hover --- resources/qml/Settings/SettingCheckBox.qml | 2 +- resources/qml/Settings/SettingComboBox.qml | 2 +- resources/qml/Widgets/ComboBox.qml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 694c4125ea..f5100eab74 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -112,7 +112,7 @@ SettingItem return UM.Theme.getColor("setting_validation_warning"); } // Validation is OK. - if (control.containsMouse || control.activeFocus) + if (control.containsMouse || control.activeFocus || hovered) { return UM.Theme.getColor("setting_control_border_highlight") } diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index 6fcc1951a4..0b7f494a7d 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -12,7 +12,6 @@ SettingItem { id: base property var focusItem: control - contents: Cura.ComboBox { id: control @@ -21,6 +20,7 @@ SettingItem textRole: "value" anchors.fill: parent + highlighted: base.hovered onActivated: { diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 6ce7c6da45..d1edcca69c 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -14,7 +14,7 @@ import Cura 1.1 as Cura ComboBox { id: control - + property bool highlighted: False background: Rectangle { color: @@ -24,7 +24,7 @@ ComboBox 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") } @@ -41,7 +41,7 @@ ComboBox 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") }