mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
CURA-4319 fix combobox hover states
This commit is contained in:
parent
073c2d3335
commit
9b33bc8194
1 changed files with 11 additions and 16 deletions
|
@ -615,14 +615,15 @@ QtObject {
|
|||
implicitHeight: Theme.getSize("setting_control").height;
|
||||
implicitWidth: Theme.getSize("setting_control").width;
|
||||
|
||||
color: (control.hovered || controler._hovered) ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control")
|
||||
color: control.hovered ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control")
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
|
||||
border.width: Theme.getSize("default_lining").width;
|
||||
border.color: (control.hovered || control._hovered) ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border");
|
||||
border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border");
|
||||
}
|
||||
|
||||
label: Item {
|
||||
|
||||
Label {
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: Theme.getSize("default_lining").width
|
||||
|
@ -658,16 +659,17 @@ QtObject {
|
|||
|
||||
// Combobox with items with colored rectangles
|
||||
property Component combobox_color: Component {
|
||||
|
||||
ComboBoxStyle {
|
||||
|
||||
background: Rectangle {
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : (control.hovered || controler._hovered) ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control")
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : control._hovered ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control")
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : (control.hovered || control._hovered) ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
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 {
|
||||
|
||||
|
||||
Label {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_lining").width
|
||||
|
@ -687,18 +689,11 @@ QtObject {
|
|||
id: swatch
|
||||
height: UM.Theme.getSize("setting_control").height / 2
|
||||
width: height
|
||||
|
||||
anchors {
|
||||
right: downArrow.left;
|
||||
verticalCenter: parent.verticalCenter
|
||||
margins: UM.Theme.getSize("default_margin").width / 4
|
||||
}
|
||||
|
||||
// border.width: UM.Theme.getSize("default_lining").width * 2
|
||||
// border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||
anchors.right: downArrow.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width / 4
|
||||
radius: width / 2
|
||||
|
||||
color: if (control.color_override != "") {return control.color_override} else {return control.color;}
|
||||
color: (control.color_override !== "") ? control.color_override : control.color
|
||||
}
|
||||
|
||||
UM.RecolorImage {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue