From 1e6be176db0c502971b4ed19e06db49d22f99abf Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Date: Sat, 2 Mar 2013 09:27:01 +0100
Subject: [PATCH] Improve look of Label

- Dont hardcode 11 px(!)
- Set colorGroup when disabled
- Use NativeRendering

Change-Id: I8ad7ca3244c952088fb7ef2704fd0d65f90d9f7c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
---
 src/controls/Label.qml                             |  7 +++++--
 tests/manual/testbench/content/PropertyLayouts.qml | 12 ++++++------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/controls/Label.qml b/src/controls/Label.qml
index 6e01701b8..460e77cec 100644
--- a/src/controls/Label.qml
+++ b/src/controls/Label.qml
@@ -80,7 +80,10 @@ Text {
     */
 
     id: label
-    font.pixelSize: 11
     color: pal.text
-    SystemPalette {id:pal}
+    renderType: Text.NativeRendering
+    SystemPalette {
+        id: pal
+        colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled
+    }
 }
diff --git a/tests/manual/testbench/content/PropertyLayouts.qml b/tests/manual/testbench/content/PropertyLayouts.qml
index 7a1059782..c191dcd01 100644
--- a/tests/manual/testbench/content/PropertyLayouts.qml
+++ b/tests/manual/testbench/content/PropertyLayouts.qml
@@ -55,7 +55,7 @@ QtObject {
 
     property Component intLayout: RowLayout {
         spacing: 4
-        Text {
+        Label {
             text: name + ":"
             Layout.minimumWidth: 100
         }
@@ -75,7 +75,7 @@ QtObject {
 
     property Component realLayout: RowLayout {
         spacing: 4
-        Text {
+        Label {
             text: name + ":"
             Layout.minimumWidth: 100
         }
@@ -106,7 +106,7 @@ QtObject {
 
     property Component stringLayout: RowLayout {
         spacing: 4
-        Text {
+        Label {
             text: name + ":"
             width: 100
         }
@@ -125,12 +125,12 @@ QtObject {
 
     property Component readonlyLayout: RowLayout {
         height: 20
-        Text {
+        Label {
             id: text
             height: 20
             text: name + ":"
         }
-        Text {
+        Label {
             height: 20
             anchors.right: parent.right
             Layout.horizontalSizePolicy: Layout.Expanding
@@ -142,7 +142,7 @@ QtObject {
         id: enumLayout
         spacing: 4
         height: 20
-        Text {
+        Label {
             text: name + ":"
             Layout.minimumWidth: 100
         }
-- 
GitLab