diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 0ed639db75..28bda7fd35 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -11,7 +11,8 @@ Button { id: button property alias cursorShape: mouseArea.cursorShape - property alias iconSource: buttonIcon.source + property alias iconSource: buttonIconLeft.source + property var iconOnRightSide: false property alias textFont: buttonText.font property alias cornerRadius: backgroundRect.radius property alias tooltip: tooltip.text @@ -35,16 +36,17 @@ Button contentItem: Row { + //Icon if displayed on the left side. UM.RecolorImage { - id: buttonIcon + id: buttonIconLeft source: "" height: Math.round(0.6 * parent.height) - width: height + width: visible ? height : 0 sourceSize.width: width sourceSize.height: height color: button.hovered ? button.textHoverColor : button.textColor - visible: source != "" + visible: source != "" && !button.iconOnRightSide anchors.verticalCenter: parent.verticalCenter } @@ -61,6 +63,20 @@ Button horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } + + //Icon if displayed on the right side. + UM.RecolorImage + { + id: buttonIconRight + source: buttonIconLeft.source + height: Math.round(0.6 * parent.height) + width: visible ? height : 0 + sourceSize.width: width + sourceSize.height: height + color: button.hovered ? button.textHoverColor : button.textColor + visible: source != "" && button.iconOnRightSide + anchors.verticalCenter: parent.verticalCenter + } } background: Rectangle diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index aa30a1236b..b38384ef8a 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -172,6 +172,9 @@ Cura.ExpandableComponent textColor: UM.Theme.getColor("primary") textHoverColor: UM.Theme.getColor("text") + iconSource: UM.Theme.icons.arrow_right + iconOnRightSide: true + onClicked: popupItem.configuration_method = "custom" } @@ -192,6 +195,8 @@ Cura.ExpandableComponent textColor: UM.Theme.getColor("primary") textHoverColor: UM.Theme.getColor("text") + iconSource: UM.Theme.icons.arrow_left + onClicked: popupItem.configuration_method = "auto" } }