mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 00:23:15 +08:00
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.
This commit is contained in:
parent
d42ddad606
commit
6de24250ed
@ -41,7 +41,7 @@ Button
|
|||||||
{
|
{
|
||||||
id: buttonIconLeft
|
id: buttonIconLeft
|
||||||
source: ""
|
source: ""
|
||||||
height: Math.round(0.6 * parent.height)
|
height: buttonText.height
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
@ -69,13 +69,13 @@ Button
|
|||||||
{
|
{
|
||||||
id: buttonIconRight
|
id: buttonIconRight
|
||||||
source: buttonIconLeft.source
|
source: buttonIconLeft.source
|
||||||
height: Math.round(0.6 * parent.height)
|
height: buttonText.height
|
||||||
width: visible ? height : 0
|
width: visible ? height : 0
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
color: button.hovered ? button.textHoverColor : button.textColor
|
color: buttonIconLeft.color
|
||||||
visible: source != "" && button.iconOnRightSide
|
visible: source != "" && button.iconOnRightSide
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: buttonIconLeft.verticalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user