From 034b1660f766211bd658127e28f0dd35809c2f6b Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 5 Dec 2018 13:05:22 +0100 Subject: [PATCH] Adjust sizes in the custom print setup mode Contributes to CURA-5941. --- .../qml/PrintSetupSelector/Custom/CustomPrintSetup.qml | 9 +++------ .../PrintSetupSelector/PrintSetupSelectorContents.qml | 8 ++++---- resources/themes/cura-light/theme.json | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index b524bb5926..8b0f3524d7 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -11,9 +11,7 @@ import Cura 1.0 as Cura Item { id: customPrintSetup - - // TODO: Hardcoded now but UX has to decide about the height of this item - height: 480 + height: childrenRect.height + padding property real padding: UM.Theme.getSize("default_margin").width property bool multipleExtruders: extrudersModel.count > 1 @@ -93,16 +91,15 @@ Item Rectangle { + height: UM.Theme.getSize("print_setup_widget").height anchors { - top: tabBar.visible ? tabBar.bottom : globalProfileRow.bottom + top: tabBar.bottom left: parent.left leftMargin: parent.padding right: parent.right rightMargin: parent.padding - bottom: parent.bottom topMargin: -UM.Theme.getSize("default_lining").width - bottomMargin: -UM.Theme.getSize("default_lining").width } z: tabBar.z - 1 // Don't show the border when only one extruder diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 0524a6de9e..522b038423 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -28,7 +28,7 @@ Item { var index = Math.round(UM.Preferences.getValue("cura/active_mode")) - if(index != null && !isNaN(index)) + if (index != null && !isNaN(index)) { return index } @@ -150,7 +150,8 @@ Item { id: buttonsSeparator - anchors.top: contents.bottom + // The buttonsSeparator is inside the contents. This is to avoid a double line in the bottom + anchors.bottom: contents.bottom width: parent.width height: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("lining") @@ -162,10 +163,9 @@ Item property real padding: UM.Theme.getSize("default_margin").width height: childrenRect.height + 2 * padding - // The buttonsSeparator is inside the buttonRow. This is to avoid some weird behaviours with the scroll bar. anchors { - top: buttonsSeparator.top + top: buttonsSeparator.bottom left: parent.left right: parent.right } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 8e440757aa..f383a570a2 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -369,7 +369,7 @@ "account_button": [12, 3], - "print_setup_widget": [38.0, 42.0], + "print_setup_widget": [38.0, 30.0], "print_setup_mode_toggle": [0.0, 2.0], "print_setup_item": [0.0, 2.0], "print_setup_extruder_box": [0.0, 6.0],