Merge pull request #2834 from Ultimaker/CURA-4527_view_orientation

Cura 4527 view orientation
This commit is contained in:
Mark 2017-11-23 09:56:26 +01:00 committed by GitHub
commit 3477b902ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 319 additions and 0 deletions

View file

@ -220,6 +220,81 @@ Rectangle
menu: PrinterMenu { }
}
//View orientation Item
Row
{
id: viewOrientationControl
height: 30
spacing: 2
anchors {
verticalCenter: base.verticalCenter
right: viewModeButton.right
rightMargin: UM.Theme.getSize("default_margin").width + viewModeButton.width
}
// #1 3d view
Button
{
iconSource: UM.Theme.getIcon("view_3d")
style: UM.Theme.styles.orientation_button
anchors.verticalCenter: viewOrientationControl.verticalCenter
onClicked:{
UM.Controller.rotateView("3d", 0);
}
visible: base.width > 1100
}
// #2 Front view
Button
{
iconSource: UM.Theme.getIcon("view_front")
style: UM.Theme.styles.orientation_button
anchors.verticalCenter: viewOrientationControl.verticalCenter
onClicked:{
UM.Controller.rotateView("home", 0);
}
visible: base.width > 1130
}
// #3 Top view
Button
{
iconSource: UM.Theme.getIcon("view_top")
style: UM.Theme.styles.orientation_button
anchors.verticalCenter: viewOrientationControl.verticalCenter
onClicked:{
UM.Controller.rotateView("y", 90);
}
visible: base.width > 1160
}
// #4 Left view
Button
{
iconSource: UM.Theme.getIcon("view_left")
style: UM.Theme.styles.orientation_button
anchors.verticalCenter: viewOrientationControl.verticalCenter
onClicked:{
UM.Controller.rotateView("x", 90);
}
visible: base.width > 1190
}
// #5 Left view
Button
{
iconSource: UM.Theme.getIcon("view_right")
style: UM.Theme.styles.orientation_button
anchors.verticalCenter: viewOrientationControl.verticalCenter
onClicked:{
UM.Controller.rotateView("x", -90);
}
visible: base.width > 1210
}
}
ComboBox
{
id: viewModeButton