Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent

This commit is contained in:
Jaime van Kessel 2019-07-02 13:51:52 +02:00
commit 0cb83d2c92
41 changed files with 946 additions and 221 deletions

View file

@ -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")

View file

@ -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