Set renderType to Text.NativeRendering for qtquick controls 2 Labels

Apparently, the qtquickcontrols 2 Label no longer defaults to using renderType: Text.NativeRendering
This causes text to render with QtRendering which looks subtly different on Windows and succinctly broken on some OSX installations.
This commit is contained in:
fieldOfView 2018-02-15 11:12:19 +01:00
parent 44bf6579fd
commit ec1cf4065e
5 changed files with 11 additions and 4 deletions

View file

@ -207,12 +207,13 @@ Rectangle
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active") : control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
}
contentItem: Text
contentItem: Label
{
text: model.text
font: UM.Theme.getFont("default")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
elide: Text.ElideRight
color:
{
@ -352,6 +353,7 @@ Rectangle
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text_subtext")
text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label Hours and minutes", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short)
renderType: Text.NativeRendering
MouseArea
{
@ -479,6 +481,7 @@ Rectangle
anchors.left: parent.left
anchors.bottom: parent.bottom
font: UM.Theme.getFont("very_small")
renderType: Text.NativeRendering
color: UM.Theme.getColor("text_subtext")
elide: Text.ElideMiddle
width: parent.width