mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Added notification icon in recomended mode. The notification icon is only
active if one of custom settings is changed CURA-4333
This commit is contained in:
parent
2cdec7e47f
commit
b318dc7087
3 changed files with 126 additions and 0 deletions
|
@ -20,11 +20,40 @@ Item
|
|||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||
property bool settingsEnabled: ExtruderManager.activeExtruderStackId || machineExtruderCount.properties.value == 1
|
||||
property bool hasUserSettings;
|
||||
|
||||
Component.onCompleted: PrintInformation.enabled = true
|
||||
Component.onDestruction: PrintInformation.enabled = false
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
onVisibleChanged:
|
||||
{
|
||||
if (visible)
|
||||
{
|
||||
base.checkUserSettings()
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onSidebarSimpleDiscardOrKeepProfileChanges:
|
||||
{
|
||||
base.hasUserSettings = false
|
||||
}
|
||||
}
|
||||
|
||||
function checkUserSettings(){
|
||||
|
||||
var skip_keys = ["support_enable" ,
|
||||
"infill_sparse_density",
|
||||
"gradual_infill_steps",
|
||||
"adhesion_type",
|
||||
"support_extruder_nr"]
|
||||
|
||||
base.hasUserSettings = Cura.MachineManager.hasUserCustomSettings(skip_keys)
|
||||
}
|
||||
|
||||
ScrollView
|
||||
{
|
||||
visible: Cura.MachineManager.activeMachineName != "" // If no printers added then the view is invisible
|
||||
|
@ -291,6 +320,7 @@ Item
|
|||
implicitWidth: 10 * screenScaleFactor
|
||||
implicitHeight: implicitWidth
|
||||
radius: implicitWidth / 2
|
||||
visible: !hasUserSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -308,6 +338,33 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//If any of settings were changed in custom mode then the Rectangle will
|
||||
//overlap quality slider area. It is used to catch mouse click
|
||||
Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: extrudersModelCheckBox.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
width: qualitySlider.width
|
||||
height: qualitySlider.height * 1.5
|
||||
//border.width: UM.Theme.getSize("default_lining").width // dispay overlap zone
|
||||
//border.color: UM.Theme.getColor("lining")
|
||||
|
||||
color: "transparent"
|
||||
|
||||
visible: hasUserSettings
|
||||
enabled: hasUserSettings
|
||||
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
discardOrKeepProfileChangesDialog.show()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
|
@ -343,6 +400,33 @@ Item
|
|||
color: (qualityModel.availableTotalTicks > 0) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: customisedSettings
|
||||
|
||||
visible: hasUserSettings
|
||||
height: speedSlider.height * 0.8
|
||||
width: speedSlider.height * 0.8
|
||||
|
||||
anchors.verticalCenter: speedSlider.verticalCenter
|
||||
anchors.right: speedSlider.left
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width / 2
|
||||
|
||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||
iconSource: UM.Theme.getIcon("reset");
|
||||
|
||||
onClicked:
|
||||
{
|
||||
discardOrKeepProfileChangesDialog.show()
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
var content = catalog.i18nc("@tooltip","You have selected a custom profile. If you want to change it, go to custom mode.")
|
||||
base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, customisedSettings.height), content)
|
||||
}
|
||||
onExited: base.hideTooltip()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue