Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2022-06-14 16:09:34 +0300
committerGhostkeeper <rubend@tutanota.com>2022-06-14 16:36:28 +0300
commit28c1291febebbb6f93f9eca00067cca89c96d084 (patch)
tree9062cafcdf5518077cae262bde9ba3380a083d04 /resources/qml
parent5cfb6f94e3ca1df3f08a88bcd939e1a53f5b55cf (diff)
Allow configuring combobox with whether they allow styled text or not
For some models we'd like to have the possibility to have rich text in the combobox. For some we'd like to prevent that, for instance to prevent the user from using colours in their profile names, or boldface, or even images. Contributes to issue CURA-8849.
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/Widgets/ComboBox.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml
index 988b7c3782..f85c5d060b 100644
--- a/resources/qml/Widgets/ComboBox.qml
+++ b/resources/qml/Widgets/ComboBox.qml
@@ -17,6 +17,8 @@ ComboBox
property var defaultTextOnEmptyModel: catalog.i18nc("@label", "No items to select from") // Text displayed in the combobox when the model is empty
property var defaultTextOnEmptyIndex: "" // Text displayed in the combobox when the model has items but no item is selected
+ property alias textFormat: contentLabel.textFormat
+
enabled: delegateModel.count > 0
onVisibleChanged: { popup.close() }
@@ -146,7 +148,7 @@ ComboBox
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
text: delegateItem.text
- textFormat: Text.PlainText
+ textFormat: control.textFormat
color: UM.Theme.getColor("setting_control_text")
elide: Text.ElideRight
wrapMode: Text.NoWrap