diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 2a41f80d2c..07b1f865be 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -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 diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index c655630a8e..4c14d2032b 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -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 { diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 4a946d16f8..b00b6774be 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -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") } } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 1f546b518c..e2ca20571c 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -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") } } diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 9ab23ad7c8..b9f11ea80d 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -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") } diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 496cc8e489..c4c441da43 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -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"); }