diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-10-29 00:34:42 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-10-29 00:34:42 (GMT) |
commit | 47448f58b73add569137ced50667c1e42bbcea75 (patch) | |
tree | e50ed0eaf4f0cf88de5e690e35896c22ff846853 /tests/auto/declarative/qmlvisual/qdeclarativetext/font | |
parent | 926729339e03fb2a68772b50445882adb4cda888 (diff) | |
download | Qt-47448f58b73add569137ced50667c1e42bbcea75.zip Qt-47448f58b73add569137ced50667c1e42bbcea75.tar.gz Qt-47448f58b73add569137ced50667c1e42bbcea75.tar.bz2 |
Shrink and update qdeclarativetext visual tests
Task-number: QTBUG-14792
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativetext/font')
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png | bin | 0 -> 77181 bytes | |||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.qml | 11 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png | bin | 0 -> 103375 bytes | |||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.qml | 11 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.0.png | bin | 0 -> 77181 bytes | |||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml | 11 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.0.png | bin | 0 -> 103375 bytes | |||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml | 11 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml | 88 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml | 50 |
10 files changed, 112 insertions, 70 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png Binary files differnew file mode 100644 index 0000000..89195ae --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.qml new file mode 100644 index 0000000..fdf2310 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "plaintext.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png Binary files differnew file mode 100644 index 0000000..6a48728 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.qml new file mode 100644 index 0000000..3da391d --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "richtext.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.0.png Binary files differnew file mode 100644 index 0000000..89195ae --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml new file mode 100644 index 0000000..fdf2310 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "plaintext.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.0.png Binary files differnew file mode 100644 index 0000000..6a48728 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml new file mode 100644 index 0000000..3da391d --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "richtext.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml index 25db179..e82d80f 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml @@ -1,11 +1,11 @@ import QtQuick 1.0 Rectangle { - id: s; width: 800; height: 1000; color: "lightsteelblue" - property string text: "The quick brown fox jumps over the lazy dog." + id: s; width: 620; height: 600; color: "lightsteelblue" + property string text: "Jackdaws love my big sphinx of quartz." Column { - spacing: 10 + spacing: 8 Text { text: s.text } @@ -13,7 +13,7 @@ Rectangle { text: s.text; font.pixelSize: 18 } Text { - text: s.text; font.pointSize: 25 + text: s.text; font.pointSize: 20 } Text { text: s.text; color: "red"; smooth: true @@ -52,40 +52,52 @@ Rectangle { text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow" } Text { - text: s.text; horizontalAlignment: Text.AlignLeft; width: 800 - } - Text { - text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: 800; height: 20 - } - Text { - text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20 - } - Text { - text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 - } - Text { - text: s.text; elide: Text.ElideLeft; width: 200 - } - Text { - text: s.text; elide: Text.ElideMiddle; width: 200 - } - Text { - text: s.text; elide: Text.ElideRight; width: 200 - } - Text { - text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere - } - Text { - text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap + text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width + } + Text { + text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20 + } + Text { + text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20 + } + Row{ + height: childrenRect.height + spacing: 4 + Text { + text: s.text; elide: Text.ElideLeft; width: 200 + } + Text { + text: s.text; elide: Text.ElideMiddle; width: 200 + } + Text { + text: s.text; elide: Text.ElideRight; width: 200 + } + } + Row{ + height: childrenRect.height + spacing: 4 + Text{ + text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap + } + Text { + text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap + } + Text { + text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap + } + } + Row{ + height: childrenRect.height + spacing: 4 + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere + } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap + } + Text { +text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 + } } } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml index 31b0e69..7d174cc 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml @@ -1,11 +1,11 @@ import QtQuick 1.0 Rectangle { - id: s; width: 800; height: 1000; color: "lightsteelblue" + id: s; width: 620; height: 600; color: "lightsteelblue" 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>." Column { - spacing: 10 + spacing: 6 Text { text: s.text } @@ -13,7 +13,7 @@ Rectangle { text: s.text; font.pixelSize: 18 } Text { - text: s.text; font.pointSize: 25 + text: s.text; font.pointSize: 18 } Text { text: s.text; color: "red"; smooth: true @@ -52,40 +52,26 @@ Rectangle { text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow" } Text { - text: s.text; horizontalAlignment: Text.AlignLeft; width: 800 + text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width } Text { - text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: 800; height: 20 + text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20 } Text { - text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20 + text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20 } - Text { - text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 - } - Text { - text: s.text; elide: Text.ElideLeft; width: 200 - } - Text { - text: s.text; elide: Text.ElideMiddle; width: 200 - } - Text { - text: s.text; elide: Text.ElideRight; width: 200 - } - Text { - text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap - } - Text { - text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere - } - Text { - text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap + Row{ + height: childrenRect.height; + spacing: 4 + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere + } + Text { + text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap + } + Text { + text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 + } } } } |