mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Move padding to only be around row
Not around the individual icons. This way the chevron can be placed next to the icon closer. Contributes to issue CURA-8008.
This commit is contained in:
parent
41642a35ff
commit
f4f48c0fda
1 changed files with 10 additions and 17 deletions
|
@ -78,28 +78,22 @@ Item
|
|||
{
|
||||
id: openFileButton
|
||||
|
||||
//Make the button square if the contents are.
|
||||
//Make the padding such that the main icon is centred, even if something else is placed besides it.
|
||||
topPadding: Math.round((parent.height - buttonIcon.height) / 2)
|
||||
leftPadding: topPadding
|
||||
rightPadding: topPadding
|
||||
bottomPadding: topPadding
|
||||
|
||||
height: UM.Theme.getSize("stage_menu").height
|
||||
width: leftPadding + openFileIconContainer.width + openFileChevronContainer.width + rightPadding
|
||||
width: leftPadding + buttonIcon.width + openFileChevronContainer.width + rightPadding
|
||||
onClicked: Cura.Actions.open.trigger()
|
||||
hoverEnabled: true
|
||||
|
||||
contentItem: Row
|
||||
{
|
||||
Item
|
||||
{
|
||||
id: openFileIconContainer
|
||||
height: parent.height
|
||||
width: height //Square button.
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: buttonIcon
|
||||
anchors.centerIn: parent
|
||||
source: UM.Theme.getIcon("Folder", "medium")
|
||||
width: UM.Theme.getSize("button_icon").width
|
||||
height: UM.Theme.getSize("button_icon").height
|
||||
|
@ -107,7 +101,6 @@ Item
|
|||
|
||||
sourceSize.height: height
|
||||
}
|
||||
}
|
||||
Item
|
||||
{
|
||||
id: openFileChevronContainer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue