mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-24 11:21:14 -07:00
Merge branch 'main' into CURA-9793_extend_recommended_print_settings
This commit is contained in:
commit
8058c16f00
10 changed files with 209 additions and 87 deletions
|
|
@ -52,8 +52,8 @@ Item
|
|||
id: intentSelection
|
||||
onClicked: menu.opened ? menu.close() : menu.open()
|
||||
|
||||
anchors.right: parent.right
|
||||
width: UM.Theme.getSize("print_setup_big_item").width
|
||||
anchors.right: profileWarningReset.left
|
||||
width: UM.Theme.getSize("print_setup_big_item").width - profileWarningReset.width
|
||||
height: textLabel.contentHeight + 2 * UM.Theme.getSize("narrow_margin").height
|
||||
hoverEnabled: true
|
||||
|
||||
|
|
@ -152,6 +152,14 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
ProfileWarningReset
|
||||
{
|
||||
id: profileWarningReset
|
||||
width: childrenRect.width
|
||||
anchors.right: parent.right
|
||||
fullWarning: false
|
||||
}
|
||||
|
||||
QualitiesWithIntentMenu
|
||||
{
|
||||
id: menu
|
||||
|
|
|
|||
|
|
@ -223,58 +223,6 @@ Popup
|
|||
color: borderColor
|
||||
}
|
||||
|
||||
MenuButton
|
||||
{
|
||||
labelText: Cura.Actions.addProfile.text
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
enabled: Cura.Actions.addProfile.enabled
|
||||
onClicked:
|
||||
{
|
||||
Cura.Actions.addProfile.trigger()
|
||||
popup.visible = false
|
||||
}
|
||||
}
|
||||
MenuButton
|
||||
{
|
||||
labelText: Cura.Actions.updateProfile.text
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
enabled: Cura.Actions.updateProfile.enabled
|
||||
|
||||
onClicked:
|
||||
{
|
||||
popup.visible = false
|
||||
Cura.Actions.updateProfile.trigger()
|
||||
}
|
||||
}
|
||||
MenuButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Discard current changes")
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
enabled: Cura.MachineManager.hasUserSettings
|
||||
|
||||
onClicked:
|
||||
{
|
||||
popup.visible = false
|
||||
Cura.ContainerManager.clearUserContainers()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
height: UM.Theme.getSize("default_lining").width
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: borderColor
|
||||
}
|
||||
|
||||
MenuButton
|
||||
{
|
||||
id: manageProfilesButton
|
||||
|
|
|
|||
|
|
@ -1,19 +1,27 @@
|
|||
// Copyright (C) 2022 UltiMaker
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
import "../Dialogs"
|
||||
|
||||
Item
|
||||
{
|
||||
property bool fullWarning: true // <- Can you see the warning icon and the text, or is it just the buttons?
|
||||
|
||||
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: warningIcon
|
||||
visible: fullWarning
|
||||
color: UM.Theme.getColor("um_yellow_5")
|
||||
height: UM.Theme.getSize("action_button_icon").height
|
||||
width: height
|
||||
width: visible ? height : 0
|
||||
radius: width
|
||||
anchors
|
||||
{
|
||||
|
|
@ -31,7 +39,8 @@ Item
|
|||
UM.Label
|
||||
{
|
||||
id: warning
|
||||
width: parent.width - warningIcon.width - resetToDefaultQualityButton.width
|
||||
visible: fullWarning
|
||||
width: visible ? parent.width - warningIcon.width - (compareAndSaveButton.width + resetToDefaultQualityButton.width) : 0
|
||||
anchors
|
||||
{
|
||||
left: warningIcon.right
|
||||
|
|
@ -76,11 +85,14 @@ Item
|
|||
PropertyChanges
|
||||
{
|
||||
target: warning
|
||||
text: catalog.i18nc("@info", "Some settings were changed.")
|
||||
text:
|
||||
{
|
||||
var profile_name = Cura.MachineManager.activeQualityOrQualityChangesName;
|
||||
return catalog.i18nc("@info %1 is the name of a profile", "Some setting-values defined in <b>%1</b> were overridden.").arg(profile_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
|
|
@ -90,17 +102,63 @@ Item
|
|||
width: height
|
||||
iconSource: UM.Theme.getIcon("ArrowReset")
|
||||
anchors
|
||||
{
|
||||
right: buttonsSpacer.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
||||
hoverColor: UM.Theme.getColor("primary_hover")
|
||||
|
||||
enabled: Cura.MachineManager.hasCustomQuality || Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
|
||||
|
||||
UM.ToolTip
|
||||
{
|
||||
visible: parent.hovered
|
||||
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
|
||||
targetPoint: Qt.point(parent.x, Math.round(parent.y + parent.height / 2))
|
||||
tooltipText: catalog.i18nc("@info", "Reset to defaults.")
|
||||
}
|
||||
}
|
||||
|
||||
// Spacer
|
||||
Item
|
||||
{
|
||||
id: buttonsSpacer
|
||||
width: UM.Theme.getSize("action_button_icon").height
|
||||
anchors.right: compareAndSaveButton.left
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: compareAndSaveButton
|
||||
height: UM.Theme.getSize("action_button_icon").height
|
||||
width: height
|
||||
iconSource: UM.Theme.getIcon("Save")
|
||||
anchors
|
||||
{
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
color: UM.Theme.getColor("accent_1")
|
||||
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
|
||||
hoverColor: UM.Theme.getColor("primary_hover")
|
||||
|
||||
onClicked:
|
||||
enabled: Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||
onClicked: CuraApplication.showCompareAndSaveProfileChanges
|
||||
(
|
||||
Cura.MachineManager.hasCustomQuality ?
|
||||
DiscardOrKeepProfileChangesDialog.ButtonsType.SaveFromCustom :
|
||||
DiscardOrKeepProfileChangesDialog.ButtonsType.SaveFromBuiltIn
|
||||
)
|
||||
|
||||
UM.ToolTip
|
||||
{
|
||||
Cura.MachineManager.resetToUseDefaultQuality()
|
||||
visible: parent.hovered
|
||||
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
|
||||
targetPoint: Qt.point(parent.x, Math.round(parent.y + parent.height / 2))
|
||||
tooltipText: catalog.i18nc("@info", "Compare and save.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import QtQuick.Layouts 1.1
|
|||
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.6 as Cura
|
||||
import ".."
|
||||
|
||||
Item
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue