Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / qdeclarativetext / font / plaintext.qml
1 import QtQuick 1.0
2 import "../../shared" 1.0
3
4 Rectangle {
5     id: s; width: 620; height: 360; color: "lightsteelblue"
6     property string text: "Jackdaws love my big sphinx of quartz."
7
8     Column {
9         spacing: 8
10         TestText {
11             text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
12         }
13         TestText {
14             font.pixelSize: 18
15             text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width;
16         }
17         TestText {
18             font.pixelSize: 24
19             text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width;
20         }
21         Grid{
22             columns: 2
23             spacing: 4
24             TestText {
25                 text: s.text; color: "red"; smooth: true
26             }
27             TestText {
28                 text: s.text; font.capitalization: "AllUppercase"
29             }
30             TestText {
31                 text: s.text; font.underline: true
32             }
33             TestText {
34                 text: s.text; font.overline: true; smooth: true
35             }
36             TestText {
37                 text: s.text; font.strikeout: true
38             }
39             TestText {
40                 text: s.text; font.underline: true; font.overline: true; font.strikeout: true
41             }
42             TestText {
43                 text: s.text; style: Text.Outline; styleColor: "white"
44             }
45             TestText {
46                 text: s.text; style: Text.Sunken; styleColor: "gray"
47             }
48             TestText {
49                 text: s.text; style: Text.Raised; styleColor: "yellow"
50             }
51             TestText {
52                 text: s.text; font.letterSpacing: 2
53             }
54         }
55         TestText {
56             text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue"
57         }
58         TestText {
59             text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
60         }
61         Row{
62             height: childrenRect.height
63             spacing: 4
64             TestText {
65                 text: s.text; elide: Text.ElideLeft; width: 200
66             }
67             TestText {
68                 text: s.text; elide: Text.ElideMiddle; width: 200
69             }
70             TestText {
71                 text: s.text; elide: Text.ElideRight; width: 200
72             }
73         }
74         Row{
75             height: childrenRect.height
76             spacing: 4
77             TestText{
78                 text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
79             }
80             TestText {
81                 text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
82             }
83             TestText {
84                 text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
85             }
86         }
87         Row{
88             height: childrenRect.height
89             spacing: 4
90             TestText {
91                 text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
92             }
93             TestText {
94                 text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap
95             }
96             TestText {
97 text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
98             }
99         }
100     }
101 }