mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Restyle printer settings dropdown
CURA-5941
This commit is contained in:
parent
a490e420f0
commit
4bccd2b7b5
6 changed files with 251 additions and 123 deletions
|
@ -12,6 +12,7 @@ Button
|
|||
id: button
|
||||
property alias cursorShape: mouseArea.cursorShape
|
||||
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
|
||||
|
@ -29,7 +30,8 @@ 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
|
||||
|
||||
contentItem: Row
|
||||
width: buttonIcon.width + buttonText.width + buttonIconRight.width
|
||||
contentItem: Item
|
||||
{
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -57,6 +59,20 @@ 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