mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
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.
This commit is contained in:
parent
5cfb6f94e3
commit
28c1291feb
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue