diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-07-09 15:23:14 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-07-09 15:23:14 +0300 |
commit | f4f48c0fdab65a5e520a8cf64bf677d32fbdc164 (patch) | |
tree | 69185da030bdeba6c696b66de0f6e4b96aa0f4df /plugins/PrepareStage | |
parent | 41642a35ffd885a6260d2dc766813884ea748bde (diff) |
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.
Diffstat (limited to 'plugins/PrepareStage')
-rw-r--r-- | plugins/PrepareStage/PrepareMenu.qml | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index bf6b76360f..850d329ab2 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -78,35 +78,28 @@ 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 + UM.RecolorImage { - id: openFileIconContainer - height: parent.height - width: height //Square button. + id: buttonIcon + source: UM.Theme.getIcon("Folder", "medium") + width: UM.Theme.getSize("button_icon").width + height: UM.Theme.getSize("button_icon").height + color: UM.Theme.getColor("icon") - 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 - color: UM.Theme.getColor("icon") - - sourceSize.height: height - } + sourceSize.height: height } Item { |