mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 03:35:56 +08:00
Adjust 3d view and add Camera View to the menu bar
CURA-4642
This commit is contained in:
parent
80324900b0
commit
49ae078396
@ -17,7 +17,12 @@ Item
|
|||||||
property alias undo: undoAction;
|
property alias undo: undoAction;
|
||||||
property alias redo: redoAction;
|
property alias redo: redoAction;
|
||||||
|
|
||||||
property alias homeCamera: homeCameraAction;
|
property alias view3DCamera: view3DCameraAction;
|
||||||
|
property alias viewFrontCamera: viewFrontCameraAction;
|
||||||
|
property alias viewTopCamera: viewTopCameraAction;
|
||||||
|
property alias viewLeftSideCamera: viewLeftSideCameraAction;
|
||||||
|
property alias viewRightSideCamera: viewRightSideCameraAction;
|
||||||
|
|
||||||
property alias expandSidebar: expandSidebarAction;
|
property alias expandSidebar: expandSidebarAction;
|
||||||
|
|
||||||
property alias deleteSelection: deleteSelectionAction;
|
property alias deleteSelection: deleteSelectionAction;
|
||||||
@ -104,9 +109,37 @@ Item
|
|||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: homeCameraAction;
|
id: view3DCameraAction;
|
||||||
text: catalog.i18nc("@action:inmenu menubar:view","&Reset camera position");
|
text: catalog.i18nc("@action:inmenu menubar:view","&3D View");
|
||||||
onTriggered: CuraActions.homeCamera();
|
onTriggered: UM.Controller.rotateView("3d", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: viewFrontCameraAction;
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:view","&Front View");
|
||||||
|
onTriggered: UM.Controller.rotateView("home", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: viewTopCameraAction;
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:view","&Top View");
|
||||||
|
onTriggered: UM.Controller.rotateView("y", 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: viewLeftSideCameraAction;
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:view","&Left Side View");
|
||||||
|
onTriggered: UM.Controller.rotateView("x", 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: viewRightSideCameraAction;
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:view","&Right Side View");
|
||||||
|
onTriggered: UM.Controller.rotateView("x", -90);
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
|
@ -31,6 +31,14 @@ Menu
|
|||||||
ExclusiveGroup { id: group }
|
ExclusiveGroup { id: group }
|
||||||
|
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
MenuItem { action: Cura.Actions.homeCamera; }
|
Menu
|
||||||
|
{
|
||||||
|
title: catalog.i18nc("@action:inmenu menubar:view","&Camera position");
|
||||||
|
MenuItem { action: Cura.Actions.view3DCamera; }
|
||||||
|
MenuItem { action: Cura.Actions.viewFrontCamera; }
|
||||||
|
MenuItem { action: Cura.Actions.viewTopCamera; }
|
||||||
|
MenuItem { action: Cura.Actions.viewLeftSideCamera; }
|
||||||
|
MenuItem { action: Cura.Actions.viewRightSideCamera; }
|
||||||
|
}
|
||||||
MenuItem { action: Cura.Actions.expandSidebar; }
|
MenuItem { action: Cura.Actions.expandSidebar; }
|
||||||
}
|
}
|
||||||
|
@ -125,10 +125,7 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user