Skip to content

Commit 08177f2

Browse files
committed
Show 'correct' intent-profiles + icons for this build.
Don't merge to main. CURA-12625 CURA-12883
1 parent 91f360b commit 08177f2

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

cura/Machines/Models/IntentCategoryModel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def _get_translations(cls):
3939
"""
4040
if len(cls._translations) == 0:
4141
cls._translations["default"] = {
42-
"name": catalog.i18nc("@label", "Balanced"),
42+
"name": catalog.i18nc("@label", "Medium"),
4343
"description": catalog.i18nc("@text",
44-
"The balanced profile is designed to strike a balance between productivity, surface quality, mechanical properties and dimensional accuracy.")
44+
"The medium profile is designed to strike a balance.")
4545
}
4646
cls._translations["visual"] = {
4747
"name": catalog.i18nc("@label", "Visual"),

cura/Machines/Models/IntentSelectionModel.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,12 @@ def _update(self) -> None:
130130
"weight": 5,
131131
})
132132

133-
result.sort(key=lambda k: k["weight"])
133+
def sort_key(itemname: str) -> int:
134+
match itemname:
135+
case "soft": return 0
136+
case "medium": return 1
137+
case "hard": return 2
138+
return 3
139+
result.sort(key=lambda k: sort_key(k["name"].lower()))
134140

135141
self.setItems(result)
136-
137-

cura/Machines/Models/IntentTranslations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
intent_translations = collections.OrderedDict() # type: collections.OrderedDict[str, Dict[str, Optional[str]]]
1010
intent_translations["default"] = {
11-
"name": catalog.i18nc("@label", "Balanced"),
11+
"name": catalog.i18nc("@label", "Medium"),
1212
"description": catalog.i18nc("@text",
13-
"The balanced profile is designed to strike a balance between productivity, surface quality, mechanical properties and dimensional accuracy.")
13+
"The balanced profile is designed to strike a balance.")
1414
}
1515
intent_translations["visual"] = {
1616
"name": catalog.i18nc("@label", "Visual"),

cura/Machines/Models/QualityManagementModel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _update(self):
343343
"quality_type": quality_group.quality_type,
344344
"quality_changes_group": None,
345345
"intent_category": "default",
346-
"section_name": catalog.i18nc("@label", "Balanced"),
346+
"section_name": catalog.i18nc("@label", "Medium"),
347347
"layer_height": layer_height, # layer_height is only used for sorting
348348
}
349349
item_list.append(item)

resources/qml/ModeSelectorButton.qml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Rectangle
8383
anchors.verticalCenter: parent.verticalCenter
8484
visible: icon === "" && custom_icon === ""
8585
border.width: UM.Theme.getSize("thick_lining").width
86-
border.color: UM.Theme.getColor("text")
86+
border.color: base.text.toLowerCase() == "soft" ? "darkred" : (base.text.toLowerCase() == "medium" ? "chocolate" : "slategray")
8787
color: "transparent"
8888

8989
UM.Label
@@ -93,10 +93,9 @@ Rectangle
9393
text: base.text.charAt(0).toUpperCase()
9494
font: UM.Theme.getFont("small_bold")
9595
horizontalAlignment: Text.AlignHCenter
96+
color: base.text.toLowerCase() == "soft" ? "firebrick" : (base.text.toLowerCase() == "medium" ? "coral" : "silver")
9697
}
9798
}
98-
99-
10099
}
101100
}
102101

resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ Item
3030
Cura.ModeSelectorButton
3131
{
3232
text: model.name
33-
icon: model.icon ? model.icon : ""
34-
custom_icon: model.custom_icon ? model.custom_icon : ""
33+
icon: ""
34+
custom_icon: ""
3535
tooltipText: model.description ? model.description : ""
3636

3737
selected: Cura.MachineManager.activeIntentCategory == model.intent_category
38+
//visible: model.name != "Balanced"
3839

3940
onClicked: {
4041
var qualityType

0 commit comments

Comments
 (0)