Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / qdeclarativetext / font / richtext2.qml
1 import QtQuick 1.0
2 import "../../shared" 1.0
3
4 //This is a continuation of richtext.qml, it was bisected so that it could fit on smaller screens
5 Rectangle {
6     id: s; width: 620; height: 300; color: "lightsteelblue"
7     property string text: "<b>The</b> <i>quick</i> <u>brown</u> <o>fox</o> <big>jumps</big> <small>over</small> <tt>the</tt> <s>lazy</s> <em>dog</em>."
8
9     Column {
10         spacing: 6
11         TestText {
12             text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
13         }
14         TestText {
15             text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
16         }
17         TestText {
18             text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
19         }
20         TestText {
21             text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
22         }
23         TestText {
24             text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20
25         }
26         TestText {
27             text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20
28         }
29         Row{
30             height: childrenRect.height;
31             spacing: 4
32             TestText {
33                 text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
34             }
35             TestText {
36                 text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap
37             }
38             TestText {
39                 text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
40             }
41         }
42     }
43 }