diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 53f44f3f03..1cf901a0bd 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -33,7 +33,7 @@ Item UM.PointingRectangle { id: layerViewMenu - anchors.left: parent.left + anchors.right: parent.right anchors.top: parent.top width: parent.width height: parent.height diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 094e138fbd..37c481defc 100755 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -319,24 +319,6 @@ UM.MainWindow } } - Loader - { - id: view_panel - - property bool hugBottom: parent.height < viewModeButton.y + viewModeButton.height + height + UM.Theme.getSize("default_margin").height - - anchors.bottom: parent.bottom // panel is always anchored to the bottom only, because dynamically switching between bottom and top results in stretching the height - anchors.bottomMargin: hugBottom ? 0 : parent.height - (viewModeButton.y + viewModeButton.height + height + UM.Theme.getSize("default_margin").height) - anchors.left: viewModeButton.left; - anchors.leftMargin: hugBottom ? viewModeButton.width + UM.Theme.getSize("default_margin").width : 0 - - property var buttonTarget: Qt.point(viewModeButton.x + viewModeButton.width / 2, viewModeButton.y + viewModeButton.height / 2) - - height: childrenRect.height; - - source: UM.ActiveView.valid ? UM.ActiveView.activeViewPanel : ""; - } - Button { id: openFileButton; @@ -393,25 +375,6 @@ UM.MainWindow monitoringPrint: base.showPrintMonitor } - Button - { - id: viewModeButton - - anchors - { - top: toolbar.bottom; - topMargin: UM.Theme.getSize("window_margin").height; - left: parent.left; - } - text: catalog.i18nc("@action:button","View Mode"); - iconSource: UM.Theme.getIcon("viewmode"); - - style: UM.Theme.styles.tool_button; - tooltip: ""; - enabled: !PrintInformation.preSliced - menu: ViewMenu { } - } - Rectangle { id: viewportOverlay diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index 1b9f6cad65..e0001cb5cd 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -196,4 +196,39 @@ Rectangle menu: PrinterMenu { } } + + Button + { + id: viewModeButton + + anchors + { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width + } + text: catalog.i18nc("@action:button", "View Mode") + iconSource: UM.Theme.getIcon("viewmode") + + style: UM.Theme.styles.tool_button + tooltip: ""; + enabled: !PrintInformation.preSliced + menu: ViewMenu { } + } + + Loader + { + id: view_panel + + anchors.top: viewModeButton.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.right: viewModeButton.right + + property var buttonTarget: Qt.point(viewModeButton.x + viewModeButton.width / 2, viewModeButton.y + viewModeButton.height / 2) + + height: childrenRect.height; + + source: UM.ActiveView.valid ? UM.ActiveView.activeViewPanel : ""; + } + }