diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index db965d3aab..620b8e29ca 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -307,6 +307,7 @@ Item model: extruderModel anchors.top: parent.top anchors.left: supportExtruderLabel.right + style: UM.Theme.styles.combobox } Label { @@ -325,6 +326,7 @@ Item anchors.top: mainExtruderCombobox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: supportExtruderLabel.right + style: UM.Theme.styles.combobox } ListModel { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 5c88645330..e536c38ba7 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -309,6 +309,52 @@ QtObject { unitFont: Theme.getFont("default"); } + property Component combobox: Component { + ComboBoxStyle { + background: Rectangle { + implicitHeight: UM.Theme.getSize("setting_control").height; + implicitWidth: UM.Theme.getSize("setting_control").width; + + color: control.hovered ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); + Behavior on color { ColorAnimation { duration: 50; } } + + border.width: Theme.getSize("default_lining").width; + 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 + anchors.right: downArrow.left; + anchors.rightMargin: Theme.getSize("default_lining").width; + anchors.verticalCenter: parent.verticalCenter; + + text: control.currentText; + font: UM.Theme.getFont("default"); + color: !enabled ? Theme.getColor("setting_control_disabled_text") : Theme.getColor("setting_control_text"); + + elide: Text.ElideRight; + verticalAlignment: Text.AlignVCenter; + } + + UM.RecolorImage { + id: downArrow + anchors.right: parent.right; + anchors.rightMargin: Theme.getSize("default_lining").width * 2; + anchors.verticalCenter: parent.verticalCenter; + + source: UM.Theme.getIcon("arrow_bottom") + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + 5 + sourceSize.height: width + 5 + + color: Theme.getColor("setting_control_text"); + } + } + } + } + property Component checkbox: Component { CheckBoxStyle { background: Item { }