Browse Source

Make the action panel to have a fixed width. Remove the animations when
switching states.

Contributes to CURA-5786.

Diego Prado Gesto 6 years ago
parent
commit
b6b60702c0

+ 3 - 4
resources/qml/ActionPanel/ActionPanelWidget.qml

@@ -16,7 +16,7 @@ Rectangle
 {
 {
     id: actionPanelWidget
     id: actionPanelWidget
 
 
-    width: childrenRect.width + 2 * UM.Theme.getSize("thick_margin").width
+    width: UM.Theme.getSize("action_panel_widget").width
     height: childrenRect.height + 2 * UM.Theme.getSize("thick_margin").height
     height: childrenRect.height + 2 * UM.Theme.getSize("thick_margin").height
 
 
     color: UM.Theme.getColor("main_background")
     color: UM.Theme.getColor("main_background")
@@ -36,13 +36,12 @@ Rectangle
             topMargin: UM.Theme.getSize("thick_margin").height
             topMargin: UM.Theme.getSize("thick_margin").height
             left: parent.left
             left: parent.left
             leftMargin: UM.Theme.getSize("thick_margin").width
             leftMargin: UM.Theme.getSize("thick_margin").width
+            right: parent.right
+            rightMargin: UM.Theme.getSize("thick_margin").width
         }
         }
         sourceComponent: outputAvailable ? outputProcessWidget : sliceProcessWidget
         sourceComponent: outputAvailable ? outputProcessWidget : sliceProcessWidget
     }
     }
 
 
-    Behavior on height { NumberAnimation { duration: 100 } }
-    Behavior on width { NumberAnimation { duration: 100 } }
-
     Component
     Component
     {
     {
         id: sliceProcessWidget
         id: sliceProcessWidget

+ 0 - 2
resources/qml/ActionPanel/SliceProcessWidget.qml

@@ -17,8 +17,6 @@ Column
 {
 {
     id: widget
     id: widget
 
 
-    width: UM.Theme.getSize("action_panel_button").width
-
     spacing: UM.Theme.getSize("thin_margin").height
     spacing: UM.Theme.getSize("thin_margin").height
 
 
     UM.I18nCatalog
     UM.I18nCatalog

+ 1 - 0
resources/themes/cura-light/theme.json

@@ -379,6 +379,7 @@
         "configuration_selector_widget": [35.0, 4.5],
         "configuration_selector_widget": [35.0, 4.5],
         "configuration_selector_mode_tabs": [0.0, 3.0],
         "configuration_selector_mode_tabs": [0.0, 3.0],
 
 
+        "action_panel_widget": [25.0, 0.0],
         "action_panel_information_widget": [20.0, 0.0],
         "action_panel_information_widget": [20.0, 0.0],
         "action_panel_button": [15.0, 3.0],
         "action_panel_button": [15.0, 3.0],