summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-03-02 09:27:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-02 09:28:10 +0100
commit1e6be176db0c502971b4ed19e06db49d22f99abf (patch)
tree30f782e2b1ccc72dfb2529975119b9ac01f917d6
parentd8df1613b61e9b3309fb5b02763bd2f46b430f27 (diff)
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>
-rw-r--r--src/controls/Label.qml7
-rw-r--r--tests/manual/testbench/content/PropertyLayouts.qml12
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
}