mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -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
|
|
@ -1,106 +0,0 @@
|
|||
import QtQuick 2.10
|
||||
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
Item
|
||||
{
|
||||
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: warningIcon
|
||||
color: UM.Theme.getColor("um_yellow_5")
|
||||
height: UM.Theme.getSize("action_button_icon").height
|
||||
width: height
|
||||
radius: width
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
UM.ColorImage
|
||||
{
|
||||
height: UM.Theme.getSize("action_button_icon").height
|
||||
width: height
|
||||
source: UM.Theme.getIcon("Warning", "low")
|
||||
}
|
||||
}
|
||||
|
||||
UM.Label
|
||||
{
|
||||
id: warning
|
||||
width: parent.width - warningIcon.width - resetToDefaultQualityButton.width
|
||||
anchors
|
||||
{
|
||||
left: warningIcon.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: UM.Theme.getSize("thin_margin").width
|
||||
}
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
states: [
|
||||
State
|
||||
{
|
||||
name: "settings changed and custom quality"
|
||||
when: Cura.SimpleModeSettingsManager.isProfileCustomized && Cura.MachineManager.hasCustomQuality
|
||||
PropertyChanges
|
||||
{
|
||||
target: warning
|
||||
text: {
|
||||
var profile_name = Cura.MachineManager.activeQualityChangesGroup.name
|
||||
return catalog.i18nc("@info, %1 is the name of the custom profile", "<b>%1</b> custom profile is active and you overwrote some settings.").arg(profile_name)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "custom quality"
|
||||
when: Cura.MachineManager.hasCustomQuality
|
||||
PropertyChanges
|
||||
{
|
||||
target: warning
|
||||
text: {
|
||||
var profile_name = Cura.MachineManager.activeQualityChangesGroup.name
|
||||
return catalog.i18nc("@info, %1 is the name of the custom profile", "<b>%1</b> custom profile is overriding some settings.").arg(profile_name)
|
||||
}
|
||||
}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "settings changed"
|
||||
when: Cura.SimpleModeSettingsManager.isProfileCustomized
|
||||
PropertyChanges
|
||||
{
|
||||
target: warning
|
||||
text: catalog.i18nc("@info", "Some settings were changed.")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: resetToDefaultQualityButton
|
||||
height: UM.Theme.getSize("action_button_icon").height
|
||||
width: height
|
||||
iconSource: UM.Theme.getIcon("ArrowReset")
|
||||
anchors
|
||||
{
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
color: UM.Theme.getColor("accent_1")
|
||||
|
||||
onClicked:
|
||||
{
|
||||
Cura.MachineManager.resetToUseDefaultQuality()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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