mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:59:13 +08:00
Fix front view button rotation, cleanup view buttons onClicked
This commit is contained in:
parent
392be23281
commit
5a9e3a8efd
@ -115,10 +115,8 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("view_3d")
|
iconSource: UM.Theme.getIcon("view_3d")
|
||||||
style: UM.Theme.styles.small_tool_button
|
style: UM.Theme.styles.small_tool_button
|
||||||
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
||||||
onClicked:{
|
onClicked:UM.Controller.rotateView("3d", 0)
|
||||||
UM.Controller.rotateView("3d", 0);
|
visible: base.width - allItemsWidth - 4 * this.width > 0
|
||||||
}
|
|
||||||
visible: base.width - allItemsWidth - 4 * this.width > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #2 Front view
|
// #2 Front view
|
||||||
@ -127,10 +125,11 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("view_front")
|
iconSource: UM.Theme.getIcon("view_front")
|
||||||
style: UM.Theme.styles.small_tool_button
|
style: UM.Theme.styles.small_tool_button
|
||||||
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
||||||
onClicked:{
|
onClicked: {
|
||||||
UM.Controller.rotateView("home", 0);
|
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
|
// #3 Top view
|
||||||
@ -139,10 +138,8 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("view_top")
|
iconSource: UM.Theme.getIcon("view_top")
|
||||||
style: UM.Theme.styles.small_tool_button
|
style: UM.Theme.styles.small_tool_button
|
||||||
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
||||||
onClicked:{
|
onClicked: UM.Controller.rotateView("y", 90)
|
||||||
UM.Controller.rotateView("y", 90);
|
visible: base.width - allItemsWidth - 2 * this.width > 0
|
||||||
}
|
|
||||||
visible: base.width - allItemsWidth - 2 * this.width > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #4 Left view
|
// #4 Left view
|
||||||
@ -151,10 +148,8 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("view_left")
|
iconSource: UM.Theme.getIcon("view_left")
|
||||||
style: UM.Theme.styles.small_tool_button
|
style: UM.Theme.styles.small_tool_button
|
||||||
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
||||||
onClicked:{
|
onClicked: UM.Controller.rotateView("x", 90)
|
||||||
UM.Controller.rotateView("x", 90);
|
visible: base.width - allItemsWidth - 1 * this.width > 0
|
||||||
}
|
|
||||||
visible: base.width - allItemsWidth - 1 * this.width > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #5 Left view
|
// #5 Left view
|
||||||
@ -163,10 +158,8 @@ Rectangle
|
|||||||
iconSource: UM.Theme.getIcon("view_right")
|
iconSource: UM.Theme.getIcon("view_right")
|
||||||
style: UM.Theme.styles.small_tool_button
|
style: UM.Theme.styles.small_tool_button
|
||||||
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
anchors.verticalCenter: viewOrientationControl.verticalCenter
|
||||||
onClicked:{
|
onClicked: UM.Controller.rotateView("x", -90)
|
||||||
UM.Controller.rotateView("x", -90);
|
visible: base.width - allItemsWidth > 0
|
||||||
}
|
|
||||||
visible: base.width - allItemsWidth > 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user