summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-05-22 04:27:38 +0200
committerBenjamin Otte <otte@redhat.com>2011-05-22 05:56:12 +0200
commitef51b5be768fa7817511ded376d16fbb244ffed0 (patch)
tree7a5d137e96281a932657a184fbf0140621801c85
parent962ecc6fa5de06dda2c586c03c5b6e1d0c6afea3 (diff)
downloadgtk+-ef51b5be768fa7817511ded376d16fbb244ffed0.tar.gz
reftests: Add label-shadows test
Tests shadows work properly for rotated labels
-rw-r--r--tests/reftests/Makefile.am3
-rw-r--r--tests/reftests/label-shadows.css8
-rw-r--r--tests/reftests/label-shadows.ref.ui184
-rw-r--r--tests/reftests/label-shadows.ui100
4 files changed, 295 insertions, 0 deletions
diff --git a/tests/reftests/Makefile.am b/tests/reftests/Makefile.am
index bf329e55e9..106cbed990 100644
--- a/tests/reftests/Makefile.am
+++ b/tests/reftests/Makefile.am
@@ -69,6 +69,9 @@ EXTRA_DIST += \
grid-homogeneous.css \
grid-homogeneous.ref.ui \
grid-homogeneous.ui \
+ label-shadows.css \
+ label-shadows.ref.ui \
+ label-shadows.ui \
label-sizing.css \
label-sizing.ref.ui \
label-sizing.ui \
diff --git a/tests/reftests/label-shadows.css b/tests/reftests/label-shadows.css
new file mode 100644
index 0000000000..28e8840cc9
--- /dev/null
+++ b/tests/reftests/label-shadows.css
@@ -0,0 +1,8 @@
+GtkLabel {
+ engine: none;
+ text-shadow: 1 1 red;
+}
+
+.no-shadow {
+ text-shadow: none
+}
diff --git a/tests/reftests/label-shadows.ref.ui b/tests/reftests/label-shadows.ref.ui
new file mode 100644
index 0000000000..a67e551a72
--- /dev/null
+++ b/tests/reftests/label-shadows.ref.ui
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkWindow" id="window1">
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkFixed" id="fixed1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="shadow1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">ABC</property>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"/>
+ </attributes>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ <packing>
+ <property name="x">2</property>
+ <property name="y">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFixed" id="fixed2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="shadow2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">90</property>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"/>
+ </attributes>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ <packing>
+ <property name="x">2</property>
+ <property name="y">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">90</property>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFixed" id="fixed3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="shadow3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">180</property>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"/>
+ </attributes>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ <packing>
+ <property name="x">0</property>
+ <property name="y">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">180</property>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFixed" id="fixed4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="shadow4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">270</property>
+ <attributes>
+ <attribute name="foreground" value="#ffff00000000"/>
+ </attributes>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ <packing>
+ <property name="x">0</property>
+ <property name="y">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">270</property>
+ <style>
+ <class name="no-shadow" />
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/tests/reftests/label-shadows.ui b/tests/reftests/label-shadows.ui
new file mode 100644
index 0000000000..1472c509a7
--- /dev/null
+++ b/tests/reftests/label-shadows.ui
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkWindow" id="window1">
+ <property name="can_focus">False</property>
+ <property name="type">popup</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">90</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">180</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="xpad">1</property>
+ <property name="ypad">1</property>
+ <property name="label" translatable="yes">ABC</property>
+ <property name="angle">270</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>