From 0337c1c77605baaa3b7fb4e9b0897e31c47f2ea7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 29 Nov 2021 11:57:12 +0100 Subject: [PATCH] Allow changing the icon size But use the same default as what was previously hard-coded. Now we can have buttons with non-standard icon sizes then, e.g. if the button size itself is also non-standard. Contributes to issue CURA-8565. --- resources/qml/ActionButton.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 62bea5df3b..f129e8c976 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -15,6 +15,7 @@ Button property bool isIconOnRightSide: false property alias iconSource: buttonIconLeft.source + property real iconSize: UM.Theme.getSize("action_button_icon").height property alias textFont: buttonText.font property alias cornerRadius: backgroundRect.radius property alias tooltip: tooltip.tooltipText @@ -158,7 +159,7 @@ Button { id: buttonIconRight source: buttonIconLeft.source - height: visible ? UM.Theme.getSize("action_button_icon").height : 0 + height: visible ? button.iconSize : 0 width: visible ? height : 0 sourceSize.width: width sourceSize.height: height