From 6a0ba435084d9b5a2007183828fae1c70dfdf07f Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Sun, 29 Oct 2017 10:07:42 +0100 Subject: [PATCH] Make sure monitor buttons do not extend sidebar --- resources/qml/MonitorButton.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 29b00f50e6..7a620c42ea 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -185,17 +185,20 @@ Item anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width; } - Row { + Item { id: buttonsRow height: abortButton.height + width: Math.min(childrenRect.width, base.width - 2 * UM.Theme.getSize("sidebar_margin").width) anchors.top: progressBar.bottom anchors.topMargin: UM.Theme.getSize("sidebar_margin").height anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width - spacing: UM.Theme.getSize("default_margin").width + clip: true Row { id: additionalComponentsRow + anchors.right: pauseResumeButton.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width } @@ -215,6 +218,8 @@ Item { id: pauseResumeButton + anchors.right: abortButton.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("save_button_save_to_button").height property bool userClicked: false @@ -261,6 +266,8 @@ Item { id: abortButton + anchors.right: parent.right + visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].canAbort enabled: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands && (["paused", "printing", "pre_print"].indexOf(Cura.MachineManager.printerOutputDevices[0].jobState) >= 0)