aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-06-26 17:37:50 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-06-29 14:09:23 +0000
commita3f686cf7cc14ff481b972b1170a7ff76d0e0fd0 (patch)
tree6617ee158110d907ebfb4cf838ca551e4e7bf173 /tests/manual/scenegraph_lancelot/data
parentb5ca94d1baab9939a73ec45ad03e8f7e84413204 (diff)
Add lancelot test for Emoji text rendering / color glyphs
We test both native text rendering and distance field text rendering (which should switch to native for the emoji glyphs automatically), in various configurations of text color, opacity, and background color. Change-Id: I06178820943cd2a52cf338f7eb5c0fca881cb625 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data')
-rw-r--r--tests/manual/scenegraph_lancelot/data/text/text_emoji.qml45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_emoji.qml b/tests/manual/scenegraph_lancelot/data/text/text_emoji.qml
new file mode 100644
index 0000000000..d50f6d6715
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/text/text_emoji.qml
@@ -0,0 +1,45 @@
+import QtQuick 2.0
+
+Item {
+ width: 320
+ height: 480
+
+ Component {
+ id: component
+ Column {
+ property variant listModel: model
+ Repeater {
+ model: [Text.NativeRendering, Text.QtRendering]
+ Rectangle {
+ width: text.implicitWidth
+ height: text.implicitHeight
+ color: listModel.backGroundColor ? listModel.backGroundColor : "white"
+
+ Text {
+ id: text
+ font.pixelSize: 32
+ renderType: modelData
+ text: "e😃m😇o😍j😜i😸!"
+
+ color: listModel.color ? listModel.color : "black"
+ opacity: listModel.opacity ? listModel.opacity : 1.0
+ }
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.centerIn: parent
+ Repeater {
+ model: ListModel {
+ ListElement { color: "black" }
+ ListElement { color: "blue" }
+ ListElement { color: "#990000ff" }
+ ListElement { opacity: 0.5 }
+ ListElement { backGroundColor: "green" }
+ }
+ delegate: component
+ }
+ }
+}