From 6de24250edbb5d5a86dbdea6eff79e15f7196326 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 20 Nov 2018 14:50:12 +0100 Subject: [PATCH] Make icon height equal to text height This seems to be about the same actually as what it was. But now the relation is in there. I also made the right icon inherit as much as possible from the left icon so that if we change something, we only have to change it in the left icon. Contributes to issue CURA-5876. --- resources/qml/ActionButton.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 28bda7fd35..7ecaeda4b0 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -41,7 +41,7 @@ Button { id: buttonIconLeft source: "" - height: Math.round(0.6 * parent.height) + height: buttonText.height width: visible ? height : 0 sourceSize.width: width sourceSize.height: height @@ -69,13 +69,13 @@ Button { id: buttonIconRight source: buttonIconLeft.source - height: Math.round(0.6 * parent.height) + height: buttonText.height width: visible ? height : 0 sourceSize.width: width sourceSize.height: height - color: button.hovered ? button.textHoverColor : button.textColor + color: buttonIconLeft.color visible: source != "" && button.iconOnRightSide - anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenter: buttonIconLeft.verticalCenter } }