mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-24 05:29:12 +08:00
Disable simple mode controls on global tab
CURA-1758
This commit is contained in:
parent
7302baa7da
commit
3923d43567
@ -19,6 +19,7 @@ Item
|
||||
property Action configureSettings;
|
||||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||
property bool settingsEnabled: ExtruderManager.activeExtruderStackId || ExtruderManager.extruderCount == 0
|
||||
|
||||
Component.onCompleted: PrintInformation.enabled = true
|
||||
Component.onDestruction: PrintInformation.enabled = false
|
||||
@ -81,7 +82,11 @@ Item
|
||||
height: width
|
||||
|
||||
border.color: {
|
||||
if(infillListView.activeIndex == index)
|
||||
if(!base.settingsEnabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_border")
|
||||
}
|
||||
else if(infillListView.activeIndex == index)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_selected")
|
||||
}
|
||||
@ -92,7 +97,17 @@ Item
|
||||
return UM.Theme.getColor("setting_control_border")
|
||||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_selected") : "transparent"
|
||||
color: {
|
||||
if(infillListView.activeIndex == index)
|
||||
{
|
||||
if(!base.settingsEnabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_text")
|
||||
}
|
||||
return UM.Theme.getColor("setting_control_selected")
|
||||
}
|
||||
return "transparent"
|
||||
}
|
||||
|
||||
UM.RecolorImage {
|
||||
id: infillIcon
|
||||
@ -102,13 +117,24 @@ Item
|
||||
sourceSize.width: width
|
||||
sourceSize.height: width
|
||||
source: UM.Theme.getIcon(model.icon);
|
||||
color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white") : UM.Theme.getColor("text")
|
||||
color: {
|
||||
if(infillListView.activeIndex == index)
|
||||
{
|
||||
return UM.Theme.getColor("text_reversed")
|
||||
}
|
||||
if(!base.settingsEnabled)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_disabled_text")
|
||||
}
|
||||
return UM.Theme.getColor("text")
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: infillMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: base.settingsEnabled
|
||||
onClicked: {
|
||||
if (infillListView.activeIndex != index)
|
||||
{
|
||||
@ -206,13 +232,15 @@ Item
|
||||
//: Setting enable skirt adhesion checkbox
|
||||
text: catalog.i18nc("@option:check", "Print Brim");
|
||||
style: UM.Theme.styles.checkbox;
|
||||
enabled: base.settingsEnabled
|
||||
|
||||
checked: platformAdhesionType.properties.value == "brim"
|
||||
checked: {print(platformAdhesionType.properties.value); return platformAdhesionType.properties.value == "brim"}
|
||||
|
||||
MouseArea {
|
||||
id: brimMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: base.settingsEnabled
|
||||
onClicked:
|
||||
{
|
||||
platformAdhesionType.setPropertyValue("value", !parent.checked ? "brim" : "skirt")
|
||||
@ -254,12 +282,14 @@ Item
|
||||
//: Setting enable support checkbox
|
||||
text: catalog.i18nc("@option:check", "Print Support Structure");
|
||||
style: UM.Theme.styles.checkbox;
|
||||
enabled: base.settingsEnabled
|
||||
|
||||
checked: supportEnabled.properties.value == "True"
|
||||
MouseArea {
|
||||
id: supportMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: base.settingsEnabled
|
||||
onClicked:
|
||||
{
|
||||
supportEnabled.setPropertyValue("value", !parent.checked)
|
||||
@ -288,6 +318,7 @@ Item
|
||||
width: parent.width / 100 * 45
|
||||
|
||||
style: UM.Theme.styles.combobox
|
||||
enabled: base.settingsEnabled
|
||||
property alias _hovered: supportExtruderMouseArea.containsMouse
|
||||
|
||||
currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0
|
||||
@ -303,6 +334,7 @@ Item
|
||||
id: supportExtruderMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: base.settingsEnabled
|
||||
acceptedButtons: Qt.NoButton
|
||||
onEntered:
|
||||
{
|
||||
@ -382,7 +414,7 @@ Item
|
||||
{
|
||||
id: platformAdhesionType
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
containerStackId: Cura.MachineManager.activeStackId
|
||||
key: "adhesion_type"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 0
|
||||
@ -392,7 +424,7 @@ Item
|
||||
{
|
||||
id: supportEnabled
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
containerStackId: Cura.MachineManager.activeStackId
|
||||
key: "support_enable"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 0
|
||||
@ -412,7 +444,7 @@ Item
|
||||
{
|
||||
id: supportExtruderNr
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
containerStackId: Cura.MachineManager.activeStackId
|
||||
key: "support_extruder_nr"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 0
|
||||
|
@ -56,7 +56,7 @@
|
||||
"text_inactive": [174, 174, 174, 255],
|
||||
"text_hover": [70, 84, 113, 255],
|
||||
"text_pressed": [12, 169, 227, 255],
|
||||
"text_white": [255, 255, 255, 255],
|
||||
"text_reversed": [255, 255, 255, 255],
|
||||
"text_subtext": [70, 84, 113, 255],
|
||||
|
||||
"error": [255, 140, 0, 255],
|
||||
|
Loading…
x
Reference in New Issue
Block a user