aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-05-31 12:05:26 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-05-31 12:05:39 +0200
commitdece229a7c2284598c36fb668de766309a6893cf (patch)
tree6e34cfa52416b2f27d2fa0631cf34f8ffd171be4 /tests/manual
parente2520ff76be49c5aa917741cc6a380fe1549e47d (diff)
parentc158ca8be49a75026e83751dfd825c5bdd63189a (diff)
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml56
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml54
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml55
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml55
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml39
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml39
6 files changed, 298 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml
new file mode 100644
index 0000000000..2f40aece89
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml
@@ -0,0 +1,56 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "One, שתיים, "
+ property string secondWord: "Three"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ }
+
+ Text {
+ id: firstWordItem
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: secondWordItem
+ anchors.left: firstWordItem.left
+ anchors.leftMargin: firstWordItem.advance.width
+ anchors.baseline: firstWordItem.baseline
+ anchors.baselineOffset: firstWordItem.advance.height
+ text: secondWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: secondWordItem.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+}
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml
new file mode 100644
index 0000000000..0a9dce4d82
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml
@@ -0,0 +1,54 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "תורת רב־לשוני אנא "
+ property string secondWord: "של"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ }
+
+ Text {
+ id: firstWordItem
+ anchors.right: referenceText.right
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: secondWordItem
+ anchors.right: firstWordItem.left
+ anchors.baseline: firstWordItem.baseline
+ anchors.baselineOffset: firstWordItem.advance.height
+ text: secondWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: firstWordItemRichText
+ anchors.right: referenceText.right
+ anchors.top: secondWordItem.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.right: firstWordItemRichText.left
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+}
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
new file mode 100644
index 0000000000..ccab5d8c64
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "Hello "
+ property string secondWord: "World"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ }
+
+ Text {
+ id: firstWordItem
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: secondWordItem
+ anchors.left: firstWordItem.left
+ anchors.leftMargin: firstWordItem.advance.width
+ anchors.baseline: firstWordItem.baseline
+ anchors.baselineOffset: firstWordItem.advance.height
+ text: secondWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: secondWordItem.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml
new file mode 100644
index 0000000000..ae0f10718c
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "One,\nTwo, "
+ property string secondWord: "Three"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ }
+
+ Text {
+ id: firstWordItem
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: secondWordItem
+ anchors.left: firstWordItem.left
+ anchors.leftMargin: firstWordItem.advance.width
+ anchors.baseline: firstWordItem.baseline
+ anchors.baselineOffset: firstWordItem.advance.height
+ text: secondWord
+ font: referenceText.font
+ }
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: secondWordItem.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml
new file mode 100644
index 0000000000..76f0910680
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "<p>One,</p><p>Two, "
+ property string secondWord: "Three</p>"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ textFormat: Text.RichText
+ }
+
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml
new file mode 100644
index 0000000000..de33d65cdc
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ property string firstWord: "<p style=\"font-size: 40pt\">One,</p><p>Two, "
+ property string secondWord: "Three</p>"
+
+ Text {
+ id: referenceText
+ text: firstWord + secondWord
+ anchors.centerIn: parent
+ font.italic: true
+ font.pixelSize: 30
+ textFormat: Text.RichText
+ }
+
+
+ Text {
+ id: firstWordItemRichText
+ anchors.left: referenceText.left
+ anchors.top: referenceText.bottom
+ text: firstWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+
+ Text {
+ id: secondWordItemRichText
+ anchors.left: firstWordItemRichText.left
+ anchors.leftMargin: firstWordItemRichText.advance.width
+ anchors.baseline: firstWordItemRichText.baseline
+ anchors.baselineOffset: firstWordItemRichText.advance.height
+ text: secondWord
+ font: referenceText.font
+ textFormat: Text.RichText
+ }
+}