From 5a9e3a8efd0a9e1a69fbcd0c8e4873906bcbcca2 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Wed, 3 Jan 2018 16:18:31 +0100 Subject: [PATCH] Fix front view button rotation, cleanup view buttons onClicked --- resources/qml/Topbar.qml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index c016c155a5..bea0a7d2e3 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -115,10 +115,8 @@ Rectangle iconSource: UM.Theme.getIcon("view_3d") style: UM.Theme.styles.small_tool_button anchors.verticalCenter: viewOrientationControl.verticalCenter - onClicked:{ - UM.Controller.rotateView("3d", 0); - } - visible: base.width - allItemsWidth - 4 * this.width > 0; + onClicked:UM.Controller.rotateView("3d", 0) + visible: base.width - allItemsWidth - 4 * this.width > 0 } // #2 Front view @@ -127,10 +125,11 @@ Rectangle iconSource: UM.Theme.getIcon("view_front") style: UM.Theme.styles.small_tool_button anchors.verticalCenter: viewOrientationControl.verticalCenter - onClicked:{ - UM.Controller.rotateView("home", 0); + onClicked: { + UM.Controller.rotateView("x", 0) + UM.Controller.rotateView("y", 0) } - visible: base.width - allItemsWidth - 3 * this.width > 0; + visible: base.width - allItemsWidth - 3 * this.width > 0 } // #3 Top view @@ -139,10 +138,8 @@ Rectangle iconSource: UM.Theme.getIcon("view_top") style: UM.Theme.styles.small_tool_button anchors.verticalCenter: viewOrientationControl.verticalCenter - onClicked:{ - UM.Controller.rotateView("y", 90); - } - visible: base.width - allItemsWidth - 2 * this.width > 0; + onClicked: UM.Controller.rotateView("y", 90) + visible: base.width - allItemsWidth - 2 * this.width > 0 } // #4 Left view @@ -151,10 +148,8 @@ Rectangle iconSource: UM.Theme.getIcon("view_left") style: UM.Theme.styles.small_tool_button anchors.verticalCenter: viewOrientationControl.verticalCenter - onClicked:{ - UM.Controller.rotateView("x", 90); - } - visible: base.width - allItemsWidth - 1 * this.width > 0; + onClicked: UM.Controller.rotateView("x", 90) + visible: base.width - allItemsWidth - 1 * this.width > 0 } // #5 Left view @@ -163,10 +158,8 @@ Rectangle iconSource: UM.Theme.getIcon("view_right") style: UM.Theme.styles.small_tool_button anchors.verticalCenter: viewOrientationControl.verticalCenter - onClicked:{ - UM.Controller.rotateView("x", -90); - } - visible: base.width - allItemsWidth > 0; + onClicked: UM.Controller.rotateView("x", -90) + visible: base.width - allItemsWidth > 0 } }