diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index d8953d7661..87d7c5f35c 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -20,11 +20,19 @@ Item name: "cura" } + anchors + { + left: parent.left + right: parent.right + leftMargin: UM.Theme.getSize("wide_margin").width + rightMargin: UM.Theme.getSize("wide_margin").width + } + // Item to ensure that all of the buttons are nicely centered. Item { anchors.horizontalCenter: parent.horizontalCenter - width: openFileButton.width + itemRow.width + UM.Theme.getSize("default_margin").width + width: parent.width - 2 * UM.Theme.getSize("wide_margin").width height: parent.height RowLayout @@ -32,9 +40,9 @@ Item id: itemRow anchors.left: openFileButton.right + anchors.right: parent.right anchors.leftMargin: UM.Theme.getSize("default_margin").width - width: Math.round(0.9 * prepareMenu.width) height: parent.height spacing: 0 diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml index 62f814aac9..1a8be9815b 100644 --- a/plugins/PreviewStage/PreviewMenu.qml +++ b/plugins/PreviewStage/PreviewMenu.qml @@ -20,15 +20,24 @@ Item name: "cura" } + anchors + { + left: parent.left + right: parent.right + leftMargin: UM.Theme.getSize("wide_margin").width + rightMargin: UM.Theme.getSize("wide_margin").width + } + Row { id: stageMenuRow - anchors.centerIn: parent - height: parent.height - width: childrenRect.width - // We want this row to have a preferred with equals to the 85% of the parent - property int preferredWidth: Math.round(0.85 * previewMenu.width) + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - 2 * UM.Theme.getSize("wide_margin").width + height: parent.height + + // // We want this row to have a preferred with up to the 85% of the parent + // property int preferredWidth: Math.round(0.85 * previewMenu.width) Cura.ViewsSelector { @@ -49,12 +58,12 @@ Item color: UM.Theme.getColor("lining") } - // This component will grow freely up to complete the preferredWidth of the row. + // This component will grow freely up to complete the width of the row. Loader { id: viewPanel height: parent.height - width: source != "" ? (stageMenuRow.preferredWidth - viewsSelector.width - printSetupSelectorItem.width - 2 * UM.Theme.getSize("default_lining").width) : 0 + width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width - 2 * (UM.Theme.getSize("wide_margin").width + UM.Theme.getSize("default_lining").width)) : 0 source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : "" } diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index b22d19d3e1..4bb1b51a83 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -81,9 +81,6 @@ Item // Prefix used for the dragged position preferences. Preferences not used if empty. Don't translate! property string dragPreferencesNamePrefix: "" - // Whether this component can remain when switchin from one stage to the other (for ex. 'Prepare' to 'Preview') - property bool isMultiStage: false - function toggleContent() { contentContainer.visible = !expanded @@ -328,18 +325,6 @@ Item updateDragPosition(); } - Connections - { - target: UM.Controller - onActiveStageChanged: - { - if (isMultiStage) - { - updateDragPosition(); - } - } - } - // DO NOT MOVE UP IN THE CODE: This connection has to be here, after the definition of the content item. // Apparently the order in which these are handled matters and so the height is correctly updated if this is here. Connections diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml index 5b22ed3393..1a9bd9f109 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml @@ -12,7 +12,6 @@ Cura.ExpandableComponent id: printSetupSelector dragPreferencesNamePrefix: "view/settings" - isMultiStage: true property bool preSlicedData: PrintInformation.preSliced