From 739f8834d0de2a1a04be14814510bcb2784d8066 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 9 Jul 2021 17:20:32 +0200 Subject: [PATCH] Align layout of providers with machine selector It's quite different in detail because there is a lot less content to show here (no machine type, icons, etc), but the basics are the same now. One possible issue is that the button doesn't extend all the way to the right, so you can't click everywhere on the shortest item. I'll see if that can still be fixed. Contributes to issue CURA-8008. --- plugins/PrepareStage/PrepareMenu.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 31da2f356b..5126d0aba6 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -85,6 +85,7 @@ Item contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft headerCornerSide: Cura.RoundedRectangle.Direction.All headerPadding: Math.round((parent.height - UM.Theme.getSize("button_icon").height) / 2) + contentPadding: UM.Theme.getSize("default_lining").width enabled: visible height: parent.height @@ -102,8 +103,6 @@ Item contentItem: Item { id: popup - width: openProviderColumn.width - height: openProviderColumn.height Column { @@ -127,9 +126,11 @@ Item color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("medium") renderType: Text.NativeRendering + verticalAlignment: Text.AlignVCenter width: contentWidth - height: contentHeight + height: UM.Theme.getSize("action_button").height + leftPadding: UM.Theme.getSize("default_margin").width } Repeater @@ -152,7 +153,7 @@ Item verticalAlignment: Text.AlignVCenter width: contentWidth - height: contentHeight + height: parent.height } onClicked: @@ -171,6 +172,7 @@ Item { color: parent.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent" radius: UM.Theme.getSize("action_button_radius").width + width: popup.width } } }