diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 01de068220..ceb4cec38b 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -155,6 +155,7 @@ Column Rectangle { id: swatch + visible: index > -1 height: UM.Theme.getSize("setting_control").height / 2 width: height anchors.left: parent.left @@ -169,8 +170,8 @@ Column Label { anchors.verticalCenter: parent.verticalCenter - anchors.left: swatch.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2 + anchors.left: swatch.visible ? swatch.right : parent.left + anchors.leftMargin: swatch.visible ? UM.Theme.getSize("default_margin").width / 2 : UM.Theme.getSize("default_margin").width anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2 @@ -227,6 +228,7 @@ Column text: Cura.MachineManager.activeVariantName tooltip: Cura.MachineManager.activeVariantName; visible: Cura.MachineManager.hasVariants + enabled: !extrudersList.visible || base.currentExtruderIndex > -1 height: UM.Theme.getSize("setting_control").height width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width @@ -271,6 +273,7 @@ Column text: Cura.MachineManager.activeMaterialName tooltip: Cura.MachineManager.activeMaterialName visible: Cura.MachineManager.hasMaterials + enabled: !extrudersList.visible || base.currentExtruderIndex > -1 height: UM.Theme.getSize("setting_control").height width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 1428c3d40a..3fdc7c896e 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -11,9 +11,10 @@ QtObject { property Component sidebar_header_button: Component { ButtonStyle { background: Rectangle { - color: Theme.getColor("setting_control") + color: control.enabled ? Theme.getColor("setting_control") : Theme.getColor("setting_control_disabled") border.width: Theme.getSize("default_lining").width - border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") + border.color: !control.enabled ? Theme.getColor("setting_control_disabled_border") : + control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") UM.RecolorImage { id: downArrow anchors.verticalCenter: parent.verticalCenter @@ -23,12 +24,12 @@ QtObject { height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: Theme.getColor("setting_category_text") + color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_control_disabled_text") source: Theme.getIcon("arrow_bottom") } Label { id: sidebarComboBoxLabel - color: Theme.getColor("setting_control_text") + color: control.enabled ? Theme.getColor("setting_control_text") : Theme.getColor("setting_control_disabled_text") text: control.text; elide: Text.ElideRight; anchors.left: parent.left;