summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/qdeclarativetext/font
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativetext/font')
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/BorderedText.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/TestText.qml13
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.pngbin77252 -> 13140 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.pngbin2778 -> 1503 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.0.pngbin0 -> 6368 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.pngbin101974 -> 9297 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.pngbin0 -> 10626 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.0.pngbin0 -> 10671 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml81
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml44
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml35
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext2.qml43
15 files changed, 148 insertions, 110 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/BorderedText.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/BorderedText.qml
new file mode 100644
index 0000000..fe4e2e7
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/BorderedText.qml
@@ -0,0 +1,9 @@
+import QtQuick 1.0
+import "../../shared" 1.0
+
+TestText {
+ property color bcolor: "blue"
+ font.pixelSize: 10
+ text: "The quick brown fox\njumps over\nthe lazy dog."
+ Rectangle { id: border; color: "transparent"; border.color: bcolor; anchors.fill: parent; opacity: 0.2 }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/TestText.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/TestText.qml
deleted file mode 100644
index 690cb15..0000000
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/TestText.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import QtQuick 1.0
-
-Text {
- id: testText
-
- property color bcolor: "blue"
-
- text: "The quick brown fox\njumps over\nthe lazy dog."
- font.family: "Helvetica"
- font.pointSize: 16
-
- Rectangle { id: borderr; color: "transparent"; border.color: bcolor; anchors.fill: parent; opacity: 0.2 }
-}
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
index 30dc0a9..56d98ff 100644
--- 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 differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
index 0574f63..1ab1eb5 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.0.png
new file mode 100644
index 0000000..04e0f5e
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.qml
new file mode 100644
index 0000000..13f413a
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.qml
@@ -0,0 +1,11 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ image: "plaintext3.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
index 8d3c37b..68921f6 100644
--- 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 differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
new file mode 100644
index 0000000..c9450c7
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.qml
new file mode 100644
index 0000000..afae3f8
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.qml
@@ -0,0 +1,11 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ image: "richtext2.0.png"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.0.png
new file mode 100644
index 0000000..34f8e38
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.qml
new file mode 100644
index 0000000..afae3f8
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.qml
@@ -0,0 +1,11 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ image: "richtext2.0.png"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index 3a06cf0..64ab65b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -2,40 +2,55 @@ import QtQuick 1.0
import "../../shared" 1.0
Rectangle {
- id: s; width: 620; height: 600; color: "lightsteelblue"
+ id: s; width: 620; height: 360; color: "lightsteelblue"
property string text: "Jackdaws love my big sphinx of quartz."
Column {
spacing: 8
TestText {
- text: s.text
- }
- TestText {
- text: s.text; font.pixelSize: 18
- }
- TestText {
- text: s.text; font.pointSize: 20
- }
- TestText {
- text: s.text; color: "red"; smooth: true
- }
- TestText {
- text: s.text; font.capitalization: "AllUppercase"
- }
- TestText {
- text: s.text; font.underline: true
- }
- TestText {
- text: s.text; font.overline: true; smooth: true
+ text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
}
TestText {
- text: s.text; font.strikeout: true
+ font.pixelSize: 18
+ text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width;
}
TestText {
- text: s.text; font.underline: true; font.overline: true; font.strikeout: true
+ font.pixelSize: 24
+ text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width;
}
- TestText {
- text: s.text; font.letterSpacing: 2
+ Grid{
+ columns: 2
+ spacing: 4
+ TestText {
+ text: s.text; color: "red"; smooth: true
+ }
+ TestText {
+ text: s.text; font.capitalization: "AllUppercase"
+ }
+ TestText {
+ text: s.text; font.underline: true
+ }
+ TestText {
+ text: s.text; font.overline: true; smooth: true
+ }
+ TestText {
+ text: s.text; font.strikeout: true
+ }
+ TestText {
+ text: s.text; font.underline: true; font.overline: true; font.strikeout: true
+ }
+ TestText {
+ text: s.text; style: Text.Outline; styleColor: "white"
+ }
+ TestText {
+ text: s.text; style: Text.Sunken; styleColor: "gray"
+ }
+ TestText {
+ text: s.text; style: Text.Raised; styleColor: "yellow"
+ }
+ TestText {
+ text: s.text; font.letterSpacing: 2
+ }
}
TestText {
text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue"
@@ -43,24 +58,6 @@ Rectangle {
TestText {
text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
}
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
- }
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
- }
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20
- }
Row{
height: childrenRect.height
spacing: 4
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml
index 087dfbe..10a2d9a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml
@@ -2,7 +2,7 @@ import QtQuick 1.0
Rectangle {
id: main
- width: 800; height: 600
+ width: 620; height: 280
Grid {
@@ -12,51 +12,51 @@ Rectangle {
Column {
spacing: 4
- TestText { }
- TestText { horizontalAlignment: Text.AlignHCenter }
- TestText { horizontalAlignment: Text.AlignRight }
+ BorderedText { }
+ BorderedText { horizontalAlignment: Text.AlignHCenter }
+ BorderedText { horizontalAlignment: Text.AlignRight }
}
Column {
spacing: 4
- TestText { wrapMode: Text.Wrap }
- TestText { horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap }
- TestText { horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap }
+ BorderedText { wrapMode: Text.Wrap }
+ BorderedText { horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap }
+ BorderedText { horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap }
}
Column {
spacing: 4
- TestText { wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
}
Column {
spacing: 4
- TestText { width: 230; wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { width: 230; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { width: 230; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 230; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 230; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 230; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
}
Column {
spacing: 4
- TestText { width: 120; wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { width: 120; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
- TestText { width: 120; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 120; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap; elide: Text.ElideRight }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap; elide: Text.ElideRight }
}
Column {
spacing: 4
- TestText { width: 120; wrapMode: Text.Wrap }
- TestText { width: 120; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap }
- TestText { width: 120; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap }
+ BorderedText { width: 120; wrapMode: Text.Wrap }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.Wrap }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignRight; wrapMode: Text.Wrap }
}
Column {
spacing: 4
- TestText { width: 120 }
- TestText { width: 120; horizontalAlignment: Text.AlignHCenter }
- TestText { width: 120; horizontalAlignment: Text.AlignRight }
+ BorderedText { width: 120 }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignHCenter }
+ BorderedText { width: 120; horizontalAlignment: Text.AlignRight }
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index 3670479..a748b68 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -2,7 +2,7 @@ import QtQuick 1.0
import "../../shared" 1.0
Rectangle {
- id: s; width: 620; height: 600; color: "lightsteelblue"
+ id: s; width: 620; height: 300; 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 {
@@ -14,7 +14,7 @@ Rectangle {
text: s.text; font.pixelSize: 18
}
TestText {
- text: s.text; font.pointSize: 18
+ text: s.text; font.pixelSize: 24
}
TestText {
text: s.text; color: "red"; smooth: true
@@ -43,36 +43,5 @@ Rectangle {
TestText {
text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green"
}
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
- }
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
- }
- TestText {
- text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20
- }
- TestText {
- text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20
- }
- Row{
- height: childrenRect.height;
- spacing: 4
- TestText {
- text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
- }
- TestText {
- text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap
- }
- TestText {
- 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/richtext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext2.qml
new file mode 100644
index 0000000..f5e85fa
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext2.qml
@@ -0,0 +1,43 @@
+import QtQuick 1.0
+import "../../shared" 1.0
+
+//This is a continuation of richtext.qml, it was bisected so that it could fit on smaller screens
+Rectangle {
+ id: s; width: 620; height: 300; 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: 6
+ TestText {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"
+ }
+ TestText {
+ text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray"
+ }
+ TestText {
+ text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow"
+ }
+ TestText {
+ text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width
+ }
+ TestText {
+ text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20
+ }
+ TestText {
+ text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20
+ }
+ Row{
+ height: childrenRect.height;
+ spacing: 4
+ TestText {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
+ }
+ TestText {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap
+ }
+ TestText {
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
+ }
+ }
+ }
+}