diff options
Diffstat (limited to 'examples/declarative/fonts/fonts.qml')
-rw-r--r-- | examples/declarative/fonts/fonts.qml | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml index 49c3d0a..97dd645 100644 --- a/examples/declarative/fonts/fonts.qml +++ b/examples/declarative/fonts/fonts.qml @@ -11,36 +11,43 @@ Rectangle { FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" } Column { - anchors.fill: parent; spacing: 15 - anchors.leftMargin: 10; anchors.rightMargin: 10 + anchors { fill: parent; leftMargin: 10; rightMargin: 10 } + spacing: 15 + Text { - text: myText; color: "lightsteelblue" - width: parent.width; elide: Text.ElideRight - font.family: "Times"; font.pointSize: 42 + text: myText + color: "lightsteelblue" + width: parent.width + elide: Text.ElideRight + font.family: "Times"; font.pointSize: 42 } Text { - text: myText; color: "lightsteelblue" - width: parent.width; elide: Text.ElideLeft - font.family: "Times"; font.pointSize: 42 - font.capitalization: Font.AllUppercase + text: myText + color: "lightsteelblue" + width: parent.width + elide: Text.ElideLeft + font { family: "Times"; pointSize: 42; capitalization: Font.AllUppercase } } Text { - text: myText; color: "lightsteelblue" - width: parent.width; elide: Text.ElideMiddle - font.family: fixedFont.name; font.pointSize: 42; font.weight: Font.Bold - font.capitalization: Font.AllLowercase + text: myText + color: "lightsteelblue" + width: parent.width + elide: Text.ElideMiddle + font { family: fixedFont.name; pointSize: 42; weight: Font.Bold; capitalization: Font.AllLowercase } } Text { - text: myText; color: "lightsteelblue" - width: parent.width; elide: Text.ElideRight - font.family: fixedFont.name; font.pointSize: 42; font.italic: true - font.capitalization: Font.SmallCaps + text: myText + color: "lightsteelblue" + width: parent.width + elide: Text.ElideRight + font { family: fixedFont.name; pointSize: 42; italic: true; capitalization: Font.SmallCaps } } Text { - text: myText; color: "lightsteelblue" - width: parent.width; elide: Text.ElideLeft - font.family: localFont.name; font.pointSize: 42 - font.capitalization: Font.Capitalize + text: myText + color: "lightsteelblue" + width: parent.width + elide: Text.ElideLeft + font { family: localFont.name; pointSize: 42; capitalization: Font.Capitalize } } Text { text: { @@ -49,7 +56,8 @@ Rectangle { else if (webFont.status == 3) "Error loading font" } color: "lightsteelblue" - width: parent.width; elide: Text.ElideMiddle + width: parent.width + elide: Text.ElideMiddle font.family: webFont.name; font.pointSize: 42 } } |