aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/text/text_wrap_elide_maxlines.qml
blob: 927f2b3148c70c64182a8f2f91254c8c1b4e8adc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import QtQuick 2.0

//test wrapping and elision when maximumLineCount is set

Item {
    width: 320
    height: 480
    Rectangle {
        id: text_area
        color: "light yellow"
        x: 50
        y: 0
        height: parent.height
        width: 150
    }
    Text {
        id: text_0000
        wrapMode: Text.WrapAnywhere
        text: "The quick brown fox jumps over the lazy dog."
        x: text_area.x
        y: text_area.y
        width: text_area.width
        maximumLineCount: 2
        elide: Text.ElideRight
        color: "red"
        font.family: "Arial"
        font.pixelSize: 22
    }
    Text {
        id: text_0001
        wrapMode: Text.Wrap
        text: text_0000.text
        anchors.top: text_0000.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "blue"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0002
        wrapMode: Text.WordWrap
        text: text_0000.text
        anchors.top: text_0001.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "green"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0003
        wrapMode: Text.WrapAnywhere
        text: "ABCDEFGHIJKL 1234567890123"
        anchors.top: text_0002.bottom
        anchors.left: text_0000.left
        width: 150
        maximumLineCount: 2
        elide: Text.ElideRight
        color: "red"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0004
        wrapMode: Text.Wrap
        text: text_0003.text
        anchors.top: text_0003.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "blue"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0005
        wrapMode: Text.WordWrap
        text: text_0003.text
        anchors.top: text_0004.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "green"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0006
        wrapMode: Text.WrapAnywhere
        text: "The quick brown 1234567890123"
        anchors.top: text_0005.bottom
        anchors.left: text_0000.left
        width: 150
        maximumLineCount: 2
        elide: Text.ElideRight
        color: "red"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0007
        wrapMode: Text.Wrap
        text: text_0006.text
        anchors.top: text_0006.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "blue"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
    Text {
        id: text_0008
        wrapMode: Text.WordWrap
        text: text_0006.text
        anchors.top: text_0007.bottom
        anchors.left: text_0000.left
        width: text_0000.width
        maximumLineCount: text_0000.maximumLineCount
        elide: Text.ElideRight
        color: "green"
        font.family: text_0000.font.family
        font.pixelSize: text_0000.font.pixelSize
    }
}