css: Add reftest for background-position

This commit is contained in:
Alexander Larsson 2012-03-16 22:14:14 +01:00 committed by Benjamin Otte
parent 5a20c42c7c
commit 65e371c16e
4 changed files with 394 additions and 0 deletions

View File

@ -37,6 +37,9 @@ EXTRA_DIST += \
background-origin.ui \
background-positioning-area-empty.ref.ui \
background-positioning-area-empty.ui \
background-position.css \
background-position.ref.ui \
background-position.ui \
background-size.css \
background-size.ref.ui \
background-size.ui \

View File

@ -0,0 +1,52 @@
@import "reset-to-defaults.css";
.button {
background-image: url("green-20x20.png");
background-repeat: no-repeat;
background-color: red;
}
.button#ref {
background-image: none;
background-color: green;
}
GtkWindow#ref {
background-color: red;
}
#a {
background-position: 50% 50%;
}
#b {
background-position: 0% 50%;
}
#c {
background-position: 0% 100%;
}
#d {
background-position: bottom right;
}
#e {
background-position: right top;
}
#f {
background-position: right;
}
#g {
background-position: 10px 10px;
}
#h {
background-position: -10px 10px;
}
#i {
background-position: 20px 20px;
}

View File

@ -0,0 +1,161 @@
<?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>
<property name="name">ref</property>
<child>
<object class="GtkFixed" id="fixed1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_request">120</property>
<property name="height_request">120</property>
<child>
<object class="GtkButton" id="button1">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">10</property>
<property name="y">10</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">40</property>
<property name="y">10</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button3">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">80</property>
<property name="y">20</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button4">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">20</property>
<property name="y">60</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button5">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">60</property>
<property name="y">40</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button6">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">100</property>
<property name="y">50</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button7">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">10</property>
<property name="y">90</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button8">
<property name="use_action_appearance">False</property>
<property name="width_request">10</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">40</property>
<property name="y">90</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button9">
<property name="use_action_appearance">False</property>
<property name="width_request">20</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">ref</property>
</object>
<packing>
<property name="x">100</property>
<property name="y">100</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,178 @@
<?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>
<property name="row_spacing">0</property>
<property name="column_spacing">0</property>
<child>
<object class="GtkButton" id="button1">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">a</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="GtkButton" id="button2">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">b</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="GtkButton" id="button3">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">c</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button4">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">d</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>
<object class="GtkButton" id="button5">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">e</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="GtkButton" id="button6">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">f</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button7">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">g</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button8">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">h</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button9">
<property name="use_action_appearance">False</property>
<property name="width_request">40</property>
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="name">i</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>