reftests: Add label-shadows test
Tests shadows work properly for rotated labels
This commit is contained in:
@@ -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 \
|
||||
|
||||
8
tests/reftests/label-shadows.css
Normal file
8
tests/reftests/label-shadows.css
Normal file
@@ -0,0 +1,8 @@
|
||||
GtkLabel {
|
||||
engine: none;
|
||||
text-shadow: 1 1 red;
|
||||
}
|
||||
|
||||
.no-shadow {
|
||||
text-shadow: none
|
||||
}
|
||||
184
tests/reftests/label-shadows.ref.ui
Normal file
184
tests/reftests/label-shadows.ref.ui
Normal file
@@ -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>
|
||||
100
tests/reftests/label-shadows.ui
Normal file
100
tests/reftests/label-shadows.ui
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user