mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 10:49:03 +08:00
Setting the height of an action button now actually changes it's size
CURA-6115
This commit is contained in:
parent
13b2b33900
commit
4151050127
@ -48,12 +48,13 @@ Button
|
|||||||
contentItem: Row
|
contentItem: Row
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("narrow_margin").width
|
spacing: UM.Theme.getSize("narrow_margin").width
|
||||||
|
height: button.height
|
||||||
//Left side icon. Only displayed if !isIconOnRightSide.
|
//Left side icon. Only displayed if !isIconOnRightSide.
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
id: buttonIconLeft
|
id: buttonIconLeft
|
||||||
source: ""
|
source: ""
|
||||||
height: UM.Theme.getSize("action_button_icon").height
|
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
@ -70,9 +71,11 @@ Button
|
|||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
visible: text != ""
|
visible: text != ""
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
|
height: parent.height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
|
width: fixedWidthMode ? button.width - button.leftPadding - button.rightPadding : undefined
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +84,7 @@ Button
|
|||||||
{
|
{
|
||||||
id: buttonIconRight
|
id: buttonIconRight
|
||||||
source: buttonIconLeft.source
|
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
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
|
@ -504,7 +504,7 @@
|
|||||||
"button_icon": [2.5, 2.5],
|
"button_icon": [2.5, 2.5],
|
||||||
"button_lining": [0, 0],
|
"button_lining": [0, 0],
|
||||||
|
|
||||||
"action_button": [15.0, 3.0],
|
"action_button": [15.0, 2.0],
|
||||||
"action_button_icon": [1.0, 1.0],
|
"action_button_icon": [1.0, 1.0],
|
||||||
"action_button_radius": [0.15, 0.15],
|
"action_button_radius": [0.15, 0.15],
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user