mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent
This commit is contained in:
commit
0cb83d2c92
41 changed files with 946 additions and 221 deletions
|
@ -24,6 +24,51 @@ Menu
|
|||
MenuItem { action: Cura.Actions.viewRightSideCamera; }
|
||||
}
|
||||
|
||||
Menu
|
||||
{
|
||||
id: cameraViewMenu
|
||||
property string cameraMode: UM.Preferences.getValue("general/camera_perspective_mode")
|
||||
Connections
|
||||
{
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if (preference !== "general/camera_perspective_mode")
|
||||
{
|
||||
return
|
||||
}
|
||||
cameraViewMenu.cameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
|
||||
}
|
||||
}
|
||||
|
||||
title: catalog.i18nc("@action:inmenu menubar:view","Camera view")
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Perspective")
|
||||
checkable: true
|
||||
checked: cameraViewMenu.cameraMode == "perspective"
|
||||
onTriggered:
|
||||
{
|
||||
UM.Preferences.setValue("general/camera_perspective_mode", "perspective")
|
||||
checked = cameraViewMenu.cameraMode == "perspective"
|
||||
}
|
||||
exclusiveGroup: group
|
||||
}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Orthographic")
|
||||
checkable: true
|
||||
checked: cameraViewMenu.cameraMode == "orthogonal"
|
||||
onTriggered:
|
||||
{
|
||||
UM.Preferences.setValue("general/camera_perspective_mode", "orthogonal")
|
||||
checked = cameraViewMenu.cameraMode == "orthogonal"
|
||||
}
|
||||
exclusiveGroup: group
|
||||
}
|
||||
ExclusiveGroup { id: group }
|
||||
}
|
||||
|
||||
MenuSeparator
|
||||
{
|
||||
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
|
||||
|
|
|
@ -91,27 +91,27 @@ SettingItem
|
|||
}
|
||||
width: height
|
||||
|
||||
color:
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
if (control.containsMouse || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
|
||||
radius: UM.Theme.getSize("setting_control_radius").width
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
|
||||
border.color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
switch (propertyProvider.properties.validationState)
|
||||
{
|
||||
case "ValidatorState.Invalid":
|
||||
case "ValidatorState.Exception":
|
||||
case "ValidatorState.MinimumError":
|
||||
case "ValidatorState.MaximumError":
|
||||
return UM.Theme.getColor("setting_validation_error");
|
||||
case "ValidatorState.MinimumWarning":
|
||||
case "ValidatorState.MaximumWarning":
|
||||
return UM.Theme.getColor("setting_validation_warning");
|
||||
}
|
||||
// Validation is OK.
|
||||
if (control.containsMouse || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
|
@ -119,6 +119,30 @@ SettingItem
|
|||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
|
||||
color: {
|
||||
if (!enabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled")
|
||||
}
|
||||
switch (propertyProvider.properties.validationState)
|
||||
{
|
||||
case "ValidatorState.Invalid":
|
||||
case "ValidatorState.Exception":
|
||||
case "ValidatorState.MinimumError":
|
||||
case "ValidatorState.MaximumError":
|
||||
return UM.Theme.getColor("setting_validation_error_background")
|
||||
case "ValidatorState.MinimumWarning":
|
||||
case "ValidatorState.MaximumWarning":
|
||||
return UM.Theme.getColor("setting_validation_warning_background")
|
||||
}
|
||||
// Validation is OK.
|
||||
if (control.containsMouse || control.activeFocus)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_highlight")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control")
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue