mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Refactor the code a bit more to better align the components in the
recommended mode. Contributes to CURA-5941.
This commit is contained in:
parent
85b34d6005
commit
990c653af4
9 changed files with 1134 additions and 1242 deletions
|
@ -12,7 +12,6 @@ Button
|
|||
{
|
||||
id: button
|
||||
property alias iconSource: buttonIcon.source
|
||||
property alias iconSourceRight: buttonIconRight.source
|
||||
property alias textFont: buttonText.font
|
||||
property alias cornerRadius: backgroundRect.radius
|
||||
property alias tooltip: tooltip.text
|
||||
|
@ -37,8 +36,7 @@ Button
|
|||
// we elide the text to the right so the text will be cut off with the three dots at the end.
|
||||
property var fixedWidthMode: false
|
||||
|
||||
width: buttonIcon.width + buttonText.width + buttonIconRight.width
|
||||
contentItem: Item
|
||||
contentItem: Row
|
||||
{
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -66,20 +64,6 @@ Button
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: buttonIconRight
|
||||
source: ""
|
||||
height: Math.round(0.6 * parent.height)
|
||||
width: height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: button.hovered ? button.textHoverColor : button.textColor
|
||||
visible: source != ""
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: source != "" ? parent.right : undefined
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue