Setting the height of an action button now actually changes it's size

CURA-6115
This commit is contained in:
Jaime van Kessel 2019-01-29 12:57:05 +01:00
parent 13b2b33900
commit 4151050127
2 changed files with 6 additions and 3 deletions

View file

@ -48,12 +48,13 @@ Button
contentItem: Row
{
spacing: UM.Theme.getSize("narrow_margin").width
height: button.height
//Left side icon. Only displayed if !isIconOnRightSide.
UM.RecolorImage
{
id: buttonIconLeft
source: ""
height: UM.Theme.getSize("action_button_icon").height
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height
@ -70,9 +71,11 @@ Button
font: UM.Theme.getFont("medium")
visible: text != ""
renderType: Text.NativeRendering
height: parent.height
anchors.verticalCenter: parent.verticalCenter
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
@ -81,7 +84,7 @@ Button
{
id: buttonIconRight
source: buttonIconLeft.source
height: UM.Theme.getSize("action_button_icon").height
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height