diff options
Diffstat (limited to 'examples/quick/text/fonts/fonts.qml')
-rw-r--r-- | examples/quick/text/fonts/fonts.qml | 30 |
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 } } } |