aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/text/fonts/fonts.qml
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-03-02 14:30:51 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-09 11:03:23 +0100
commit4b56661fd27cf6ce0c9410759fbd5c390e41dd69 (patch)
treedc27d3cd25f308100d8176d371a3748f2abbf65e /examples/quick/text/fonts/fonts.qml
parent356bdc098d6f120003db227416c788bd9d51048d (diff)
Update text examples to new guidelines
Change-Id: I6bbf414f3734bc2f29a7182746c5df158a5924da Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'examples/quick/text/fonts/fonts.qml')
-rw-r--r--examples/quick/text/fonts/fonts.qml30
1 files changed, 16 insertions, 14 deletions
diff --git a/examples/quick/text/fonts/fonts.qml b/examples/quick/text/fonts/fonts.qml
index 78cef25eae..f0e9b60bc5 100644
--- a/examples/quick/text/fonts/fonts.qml
+++ b/examples/quick/text/fonts/fonts.qml
@@ -43,7 +43,7 @@ import QtQuick 2.0
Rectangle {
property string myText: "The quick brown fox jumps over the lazy dog."
- width: 800; height: 480
+ width: 320; height: 480
color: "steelblue"
FontLoader { id: fixedFont; name: "Courier" }
@@ -51,43 +51,45 @@ Rectangle {
FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" }
Column {
- anchors { fill: parent; leftMargin: 10; rightMargin: 10 }
+ anchors { fill: parent; leftMargin: 10; rightMargin: 10; topMargin: 10 }
spacing: 15
Text {
text: myText
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideRight
- font.family: "Times"; font.pointSize: 42
+ wrapMode: Text.WordWrap
+ font.family: "Times"; font.pixelSize: 20
}
Text {
text: myText
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideLeft
- font { family: "Times"; pointSize: 42; capitalization: Font.AllUppercase }
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ font { family: "Times"; pixelSize: 20; capitalization: Font.AllUppercase }
}
Text {
text: myText
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideMiddle
- font { family: fixedFont.name; pointSize: 42; weight: Font.Bold; capitalization: Font.AllLowercase }
+ horizontalAlignment: Text.AlignRight
+ wrapMode: Text.WordWrap
+ font { family: fixedFont.name; pixelSize: 20; weight: Font.Bold; capitalization: Font.AllLowercase }
}
Text {
text: myText
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideRight
- font { family: fixedFont.name; pointSize: 42; italic: true; capitalization: Font.SmallCaps }
+ wrapMode: Text.WordWrap
+ font { family: fixedFont.name; pixelSize: 20; italic: true; capitalization: Font.SmallCaps }
}
Text {
text: myText
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideLeft
- font { family: localFont.name; pointSize: 42; capitalization: Font.Capitalize }
+ wrapMode: Text.WordWrap
+ font { family: localFont.name; pixelSize: 20; capitalization: Font.Capitalize }
}
Text {
text: {
@@ -97,8 +99,8 @@ Rectangle {
}
color: "lightsteelblue"
width: parent.width
- elide: Text.ElideMiddle
- font.family: webFont.name; font.pointSize: 42
+ wrapMode: Text.WordWrap
+ font.family: webFont.name; font.pixelSize: 20
}
}
}