diff --git a/internal/frontend/qml/Proton/Button.qml b/internal/frontend/qml/Proton/Button.qml index 4a42afad..35ed0f1c 100644 --- a/internal/frontend/qml/Proton/Button.qml +++ b/internal/frontend/qml/Proton/Button.qml @@ -155,7 +155,7 @@ T.Button { return control.colorScheme.interaction_norm_active } - if (control.enabled && (control.highlighted || control.hovered || control.checked)) { + if (control.enabled && (control.highlighted || control.hovered || control.checked || control.activeFocus)) { return control.colorScheme.interaction_norm_hover } @@ -171,7 +171,7 @@ T.Button { return control.colorScheme.interaction_default_active } - if (control.enabled && (control.highlighted || control.hovered || control.checked)) { + if (control.enabled && (control.highlighted || control.hovered || control.checked || control.activeFocus)) { return control.colorScheme.interaction_default_hover } @@ -189,7 +189,7 @@ T.Button { return control.colorScheme.interaction_default_active } - if (control.enabled && (control.highlighted || control.hovered || control.checked)) { + if (control.enabled && (control.highlighted || control.hovered || control.checked || control.activeFocus)) { return control.colorScheme.interaction_default_hover } @@ -205,7 +205,7 @@ T.Button { return control.colorScheme.interaction_default_active } - if (control.enabled && (control.highlighted || control.hovered || control.checked)) { + if (control.enabled && (control.highlighted || control.hovered || control.checked || control.activeFocus)) { return control.colorScheme.interaction_default_hover } diff --git a/internal/frontend/qml/Proton/CheckBox.qml b/internal/frontend/qml/Proton/CheckBox.qml index 5b200a44..651cbc64 100644 --- a/internal/frontend/qml/Proton/CheckBox.qml +++ b/internal/frontend/qml/Proton/CheckBox.qml @@ -57,7 +57,7 @@ T.CheckBox { return control.colorScheme.signal_danger } - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.interaction_norm_hover } @@ -74,7 +74,7 @@ T.CheckBox { return control.colorScheme.signal_danger } - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.interaction_norm_hover } diff --git a/internal/frontend/qml/Proton/ComboBox.qml b/internal/frontend/qml/Proton/ComboBox.qml index 87122fce..79ca3bc4 100644 --- a/internal/frontend/qml/Proton/ComboBox.qml +++ b/internal/frontend/qml/Proton/ComboBox.qml @@ -71,7 +71,7 @@ T.ComboBox { return root.colorScheme.interaction_norm } - if (root.hovered) { + if (root.hovered || root.activeFocus) { return root.colorScheme.field_hover } @@ -91,7 +91,7 @@ T.ComboBox { return root.colorScheme.interaction_default_active } - if (root.enabled && root.hovered) { + if (root.enabled && root.hovered || root.activeFocus) { return root.colorScheme.interaction_default_hover } @@ -121,14 +121,25 @@ T.ComboBox { width: parent.width text: root.textRole ? (Array.isArray(root.model) ? modelData[root.textRole] : model[root.textRole]) : modelData - palette.text: root.enabled ? root.colorScheme.text_norm : root.colorScheme.text_disabled + palette.text: { + if (!root.enabled) { + return root.colorScheme.text_disabled + } + + if (selected) { + return root.colorScheme.text_invert + } + + return root.colorScheme.text_norm + } font: root.font hoverEnabled: root.hoverEnabled - // we use highlighted to indicate currently selected delegate - highlighted: root.currentIndex === index - palette.highlightedText: root.enabled ? root.colorScheme.text_invert : root.colorScheme.text_disabled + property bool selected: root.currentIndex === index + + highlighted: root.highlightedIndex === index + palette.highlightedText: selected ? root.colorScheme.text_invert : root.colorScheme.text_norm background: PaddedRectangle { radius: 4 @@ -137,11 +148,11 @@ T.ComboBox { return root.colorScheme.interaction_default_active } - if (parent.highlighted) { + if (parent.selected) { return root.colorScheme.interaction_norm } - if (parent.hovered) { + if (parent.hovered || parent.highlighted) { return root.colorScheme.interaction_default_hover } diff --git a/internal/frontend/qml/Proton/RadioButton.qml b/internal/frontend/qml/Proton/RadioButton.qml index 43e4d26a..a39bbea6 100644 --- a/internal/frontend/qml/Proton/RadioButton.qml +++ b/internal/frontend/qml/Proton/RadioButton.qml @@ -55,7 +55,7 @@ T.RadioButton { return control.colorScheme.signal_danger } - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.interaction_norm_hover } @@ -77,7 +77,7 @@ T.RadioButton { return control.colorScheme.signal_danger } - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.interaction_norm_hover } diff --git a/internal/frontend/qml/Proton/Switch.qml b/internal/frontend/qml/Proton/Switch.qml index 925e2daa..bf64dc72 100644 --- a/internal/frontend/qml/Proton/Switch.qml +++ b/internal/frontend/qml/Proton/Switch.qml @@ -46,7 +46,7 @@ T.Switch { padding: 0 spacing: 7 - indicator: PaddedRectangle { + indicator: Rectangle { implicitWidth: 40 implicitHeight: 24 @@ -54,9 +54,6 @@ T.Switch { y: control.topPadding + (control.availableHeight - height) / 2 radius: 12 - leftPadding: 0 - rightPadding: 0 - padding: 0 color: control.enabled || control.loading ? control.colorScheme.background_norm : control.colorScheme.background_strong border.width: control.enabled && !loading ? 1 : 0 border.color: control.hovered ? control.colorScheme.field_hover : control.colorScheme.field_norm @@ -76,14 +73,14 @@ T.Switch { } if (control.checked) { - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.interaction_norm_hover } return control.colorScheme.interaction_norm } - if (control.hovered) { + if (control.hovered || control.activeFocus) { return control.colorScheme.field_hover } diff --git a/internal/frontend/qml/Proton/TextField.qml b/internal/frontend/qml/Proton/TextField.qml index 4110878f..d3bfbd8a 100644 --- a/internal/frontend/qml/Proton/TextField.qml +++ b/internal/frontend/qml/Proton/TextField.qml @@ -279,7 +279,6 @@ Item { visible: root.echoMode === TextInput.Password icon.color: control.color - background: Item { } checkable: true icon.source: checked ? "../icons/ic-eye-slash.svg" : "../icons/ic-eye.svg" }