Browse Source

Move a few hardcoded sizes to the theme

CURA-5785
Jaime van Kessel 6 years ago
parent
commit
b589920f53
2 changed files with 6 additions and 7 deletions
  1. 4 5
      plugins/PrepareStage/PrepareMenu.qml
  2. 2 2
      resources/themes/cura-light/theme.json

+ 4 - 5
plugins/PrepareStage/PrepareMenu.qml

@@ -53,9 +53,8 @@ Item
                 {
                     id: machineSelection
                     z: openFileButtonBackground.z - 1
-
-                    Layout.minimumWidth: 240
-                    Layout.maximumWidth: 240
+                    Layout.minimumWidth: UM.Theme.getSize("machine_selector_widget").width
+                    Layout.maximumWidth: UM.Theme.getSize("machine_selector_widget").width
                     Layout.fillWidth: true
                     Layout.fillHeight: true
                 }
@@ -90,8 +89,8 @@ Item
                     onShowTooltip: prepareMenu.showTooltip(item, location, text)
                     onHideTooltip: prepareMenu.hideTooltip()
 
-                    Layout.minimumWidth: 460
-                    Layout.maximumWidth: 460
+                    Layout.minimumWidth: UM.Theme.getSize("print_setup_widget").width
+                    Layout.maximumWidth: UM.Theme.getSize("print_setup_widget").width
                     Layout.fillWidth: true
                     Layout.fillHeight: true
                 }

+ 2 - 2
resources/themes/cura-light/theme.json

@@ -374,7 +374,7 @@
 
         "account_button": [12, 3],
 
-        "print_setup_widget": [35.0, 42.0],
+        "print_setup_widget": [30.0, 42.0],
         "print_setup_mode_toggle": [0.0, 2.0],
         "print_setup_item": [0.0, 2.0],
         "print_setup_extruder_box": [0.0, 6.0],
@@ -386,7 +386,7 @@
         "action_panel_information_widget": [20.0, 0.0],
         "action_panel_button": [15.0, 3.0],
 
-        "machine_selector_widget": [28.0, 4.5],
+        "machine_selector_widget": [16.0, 4.5],
 
         "views_selector": [0.0, 4.0],