Set textFormat for the setting items to PlainText

Based on the Qt guide on making qml run much faster, it seems that the default of textFormatting (auto)
is quite expensive. As we make a *lot* of settingItems, which we don't want to format, it's better to set it to plain.
I haven't checked how much faster it actually is, but i didn't see visual changes, so it's at least a safe step.
This commit is contained in:
Jaime van Kessel 2018-09-20 15:22:35 +02:00
parent 6535f7890b
commit 2dbaa304a0
7 changed files with 12 additions and 3 deletions

View file

@ -73,6 +73,7 @@ SettingItem
anchors.right: downArrow.left
text: control.currentText
textFormat: Text.PlainText
renderType: Text.NativeRendering
font: UM.Theme.getFont("default")
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
@ -115,6 +116,7 @@ SettingItem
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
text: modelData.value
textFormat: Text.PlainText
renderType: Text.NativeRendering
color: control.contentItem.color
font: UM.Theme.getFont("default")