From b6b60702c054ff93c112089583c721a6ddedd44a Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 6 Nov 2018 14:32:48 +0100 Subject: [PATCH] Make the action panel to have a fixed width. Remove the animations when switching states. Contributes to CURA-5786. --- resources/qml/ActionPanel/ActionPanelWidget.qml | 7 +++---- resources/qml/ActionPanel/SliceProcessWidget.qml | 2 -- resources/themes/cura-light/theme.json | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/resources/qml/ActionPanel/ActionPanelWidget.qml b/resources/qml/ActionPanel/ActionPanelWidget.qml index 1fc288af6a..0db778de5a 100644 --- a/resources/qml/ActionPanel/ActionPanelWidget.qml +++ b/resources/qml/ActionPanel/ActionPanelWidget.qml @@ -16,7 +16,7 @@ Rectangle { 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 color: UM.Theme.getColor("main_background") @@ -36,13 +36,12 @@ Rectangle topMargin: UM.Theme.getSize("thick_margin").height left: parent.left leftMargin: UM.Theme.getSize("thick_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("thick_margin").width } sourceComponent: outputAvailable ? outputProcessWidget : sliceProcessWidget } - Behavior on height { NumberAnimation { duration: 100 } } - Behavior on width { NumberAnimation { duration: 100 } } - Component { id: sliceProcessWidget diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index e70ec45e43..1ba5776b6b 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -17,8 +17,6 @@ Column { id: widget - width: UM.Theme.getSize("action_panel_button").width - spacing: UM.Theme.getSize("thin_margin").height UM.I18nCatalog diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f354b521ee..27dfbaf807 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -379,6 +379,7 @@ "configuration_selector_widget": [35.0, 4.5], "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_button": [15.0, 3.0],