mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:49:00 +08:00
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.
This commit is contained in:
parent
0d05e71f9d
commit
0337c1c776
@ -15,6 +15,7 @@ Button
|
|||||||
property bool isIconOnRightSide: false
|
property bool isIconOnRightSide: false
|
||||||
|
|
||||||
property alias iconSource: buttonIconLeft.source
|
property alias iconSource: buttonIconLeft.source
|
||||||
|
property real iconSize: UM.Theme.getSize("action_button_icon").height
|
||||||
property alias textFont: buttonText.font
|
property alias textFont: buttonText.font
|
||||||
property alias cornerRadius: backgroundRect.radius
|
property alias cornerRadius: backgroundRect.radius
|
||||||
property alias tooltip: tooltip.tooltipText
|
property alias tooltip: tooltip.tooltipText
|
||||||
@ -158,7 +159,7 @@ Button
|
|||||||
{
|
{
|
||||||
id: buttonIconRight
|
id: buttonIconRight
|
||||||
source: buttonIconLeft.source
|
source: buttonIconLeft.source
|
||||||
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
height: visible ? button.iconSize : 0
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user