summaryrefslogtreecommitdiffstats
path: root/basicsuite
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2014-12-02 15:43:54 +0100
committerAndy Nichols <andy.nichols@theqtcompany.com>2014-12-03 10:36:51 +0200
commit743e87e0d4706c3bef50302efdb4fbf45cd7bbda (patch)
tree18bc991a491f30d275e9d228a5d689f6479ee760 /basicsuite
parent0a79fd900e3dd5cd7849f038532916ec6b8d6d91 (diff)
Flat Style Demo fix to label rendering
Labels from Qt Quick controls use Text.NativeRendering which seems to cause issues when the screen lies about its DPI. For this example we override the labels to use Text.QtRendering The rest of the rendering errors are the same, but we can changed by updating the Flat style in the Qt Quick Enterprise Controls module. Change-Id: Ie45d22bc1ba8764ff075257c9d719682c323155c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'basicsuite')
-rw-r--r--basicsuite/enterprise-flat-controls/Content.qml2
-rw-r--r--basicsuite/enterprise-flat-controls/main.qml5
2 files changed, 7 insertions, 0 deletions
diff --git a/basicsuite/enterprise-flat-controls/Content.qml b/basicsuite/enterprise-flat-controls/Content.qml
index 51569ce..7c630f2 100644
--- a/basicsuite/enterprise-flat-controls/Content.qml
+++ b/basicsuite/enterprise-flat-controls/Content.qml
@@ -162,6 +162,7 @@ Item {
text: modelData
font.family: Flat.FlatStyle.fontFamily
Layout.preferredWidth: fontMetrics.advanceWidth("Second")
+ renderType: Text.QtRendering
}
Switch { checked: index == 0 }
}
@@ -223,6 +224,7 @@ Item {
Label {
text: "Camera " + (index + 1)
font.family: Flat.FlatStyle.fontFamily
+ renderType: Text.QtRendering
}
}
}
diff --git a/basicsuite/enterprise-flat-controls/main.qml b/basicsuite/enterprise-flat-controls/main.qml
index 0b9f4e9..a639001 100644
--- a/basicsuite/enterprise-flat-controls/main.qml
+++ b/basicsuite/enterprise-flat-controls/main.qml
@@ -135,6 +135,7 @@ Rectangle {
font.family: Flat.FlatStyle.fontFamily
font.pixelSize: Math.round(16 * Flat.FlatStyle.scaleFactor)
color: "white"
+ renderType: Text.QtRendering
anchors.left: parent.left
anchors.leftMargin: menuMargins
anchors.verticalCenter: parent.verticalCenter
@@ -170,6 +171,7 @@ Rectangle {
font.pixelSize: Math.round(15 * Flat.FlatStyle.scaleFactor)
font.family: Flat.FlatStyle.fontFamily
color: delegateItem.ListView.isCurrentItem ? Flat.FlatStyle.styleColor : Flat.FlatStyle.defaultColor
+ renderType: Text.QtRendering
anchors.left: parent.left
anchors.leftMargin: menuMargins
anchors.verticalCenter: parent.verticalCenter
@@ -320,6 +322,7 @@ Rectangle {
font.family: Flat.FlatStyle.fontFamily
font.pixelSize: Math.round(16 * Flat.FlatStyle.scaleFactor)
color: "white"
+ renderType: Text.QtRendering
anchors.left: parent.left
anchors.leftMargin: menuMargins
anchors.verticalCenter: parent.verticalCenter
@@ -394,6 +397,7 @@ Rectangle {
fontSizeMode: Text.Fit
verticalAlignment: Text.AlignVCenter
color: Flat.FlatStyle.defaultColor
+ renderType: Text.QtRendering
}
CheckBox {
@@ -416,6 +420,7 @@ Rectangle {
font.pixelSize: Math.round(15 * Flat.FlatStyle.scaleFactor)
anchors.verticalCenter: parent.verticalCenter
color: Flat.FlatStyle.defaultColor
+ renderType: Text.QtRendering
}
}