mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
reftests: Add a test for inset box-shadow
This test is copied from the CSS spec. The reference is very sensitive to the rendering algorithm in use, because the rounded corners have semi-transparent pixels. It might be necessary to update them in the future.
This commit is contained in:
parent
b196abe8be
commit
a1d19be950
@ -54,6 +54,9 @@ EXTRA_DIST += \
|
||||
box-pseudo-classes.css \
|
||||
box-pseudo-classes.ref.ui \
|
||||
box-pseudo-classes.ui \
|
||||
box-shadow-spec-inset.css \
|
||||
box-shadow-spec-inset.ref.ui \
|
||||
box-shadow-spec-inset.ui \
|
||||
css-match-class.css \
|
||||
css-match-class.ref.ui \
|
||||
css-match-class.ui \
|
||||
|
65
tests/reftests/box-shadow-spec-inset.css
Normal file
65
tests/reftests/box-shadow-spec-inset.css
Normal file
@ -0,0 +1,65 @@
|
||||
GtkButton {
|
||||
engine: none;
|
||||
border-radius: 0;
|
||||
background-image: none;
|
||||
border-image: none;
|
||||
border-style: none;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.row1, .row2, .row3 {
|
||||
/*border:5px solid blue;*/
|
||||
border-width: 5;
|
||||
border-style: solid;
|
||||
border-color: blue;
|
||||
background-color:orange;
|
||||
}
|
||||
|
||||
.column1 {
|
||||
border-radius: 20/*px*/;
|
||||
}
|
||||
|
||||
.column2 {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
box-shadow:
|
||||
rgba(0,0,0,1)
|
||||
15/*px*/ 15/*px*/
|
||||
inset
|
||||
}
|
||||
|
||||
.row3 {
|
||||
box-shadow:
|
||||
rgba(0,0,0,1)
|
||||
15/*px*/ 15/*px*/ 0
|
||||
10/*px*/ /*spread*/
|
||||
inset
|
||||
}
|
||||
|
||||
.reference-border {
|
||||
border-width: 5;
|
||||
border-style: solid;
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
.reference-background {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.reference-shadow {
|
||||
background-color: rgba(0,0,0,1);
|
||||
}
|
||||
|
||||
.reference-padding-radius {
|
||||
border-radius: 15
|
||||
}
|
||||
|
||||
.reference-radii1 {
|
||||
border-radius: 15 0 10;
|
||||
}
|
||||
|
||||
.reference-radii2 {
|
||||
border-radius: 5 0 10;
|
||||
}
|
330
tests/reftests/box-shadow-spec-inset.ref.ui
Normal file
330
tests/reftests/box-shadow-spec-inset.ref.ui
Normal file
@ -0,0 +1,330 @@
|
||||
<?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">20</property>
|
||||
<property name="column_spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-1-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="reference-background" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</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="widget-1-2">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="reference-background" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</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="widget-2-1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-1-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-1-2">
|
||||
<property name="width_request">134</property>
|
||||
<property name="height_request">134</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-shadow" />
|
||||
<class name="reference-padding-radius" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">5</property>
|
||||
<property name="y">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-1-3">
|
||||
<property name="width_request">119</property>
|
||||
<property name="height_request">119</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="reference-radii1" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">20</property>
|
||||
<property name="y">20</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-1-4">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</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>
|
||||
<child>
|
||||
<object class="GtkFixed" id="widget-2-2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-2-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="reference-background" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-2-2">
|
||||
<property name="width_request">134</property>
|
||||
<property name="height_request">134</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-shadow" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">5</property>
|
||||
<property name="y">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-2-3">
|
||||
<property name="width_request">119</property>
|
||||
<property name="height_request">119</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">20</property>
|
||||
<property name="y">20</property>
|
||||
</packing>
|
||||
</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="widget-3-1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-1-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-1-2">
|
||||
<property name="width_request">134</property>
|
||||
<property name="height_request">134</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-shadow" />
|
||||
<class name="reference-padding-radius" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">5</property>
|
||||
<property name="y">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-1-3">
|
||||
<property name="width_request">109</property>
|
||||
<property name="height_request">109</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="reference-radii2" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">30</property>
|
||||
<property name="y">30</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-1-4">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="column1" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</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="GtkFixed" id="widget-3-2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-2-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-border" />
|
||||
<class name="reference-background" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-2-2">
|
||||
<property name="width_request">134</property>
|
||||
<property name="height_request">134</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-shadow" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">5</property>
|
||||
<property name="y">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-3-2-3">
|
||||
<property name="width_request">109</property>
|
||||
<property name="height_request">109</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="reference-background" />
|
||||
<class name="column2" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x">30</property>
|
||||
<property name="y">30</property>
|
||||
</packing>
|
||||
</child>
|
||||
</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>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
124
tests/reftests/box-shadow-spec-inset.ui
Normal file
124
tests/reftests/box-shadow-spec-inset.ui
Normal file
@ -0,0 +1,124 @@
|
||||
<?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">20</property>
|
||||
<property name="column_spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-1-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column1" />
|
||||
<class name="row1" />
|
||||
</style>
|
||||
</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="widget-1-2">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column1" />
|
||||
<class name="row2" />
|
||||
</style>
|
||||
</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="widget-1-3">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column1" />
|
||||
<class name="row3" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-1">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column2" />
|
||||
<class name="row1" />
|
||||
</style>
|
||||
</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="widget-2-2">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column2" />
|
||||
<class name="row2" />
|
||||
</style>
|
||||
</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>
|
||||
<child>
|
||||
<object class="GtkButton" id="widget-2-3">
|
||||
<property name="width_request">144</property>
|
||||
<property name="height_request">144</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="column2" />
|
||||
<class name="row3" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user