forked from AuroraMiddleware/gtk
Merge branch 'content-fit-reftests' into 'main'
reftests: Add content-fit picture tests See merge request GNOME/gtk!4879
This commit is contained in:
commit
188cb49b44
BIN
testsuite/reftests/green-border-red-100x100.png
Normal file
BIN
testsuite/reftests/green-border-red-100x100.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 308 B |
@ -488,6 +488,18 @@ testdata = [
|
||||
'partial-rounded-border.css',
|
||||
'partial-rounded-border.ref.ui',
|
||||
'partial-rounded-border.ui',
|
||||
'picture-content-fit-contain.css',
|
||||
'picture-content-fit-contain.ref.ui',
|
||||
'picture-content-fit-contain.ui',
|
||||
'picture-content-fit-cover.css',
|
||||
'picture-content-fit-cover.ref.ui',
|
||||
'picture-content-fit-cover.ui',
|
||||
'picture-content-fit-fill.css',
|
||||
'picture-content-fit-fill.ref.ui',
|
||||
'picture-content-fit-fill.ui',
|
||||
'picture-content-fit-scale-down.css',
|
||||
'picture-content-fit-scale-down.ref.ui',
|
||||
'picture-content-fit-scale-down.ui',
|
||||
'picture-load-invalid-file.ui',
|
||||
'picture-load-invalid-file.ref.ui',
|
||||
'pixbuf-icon.ref.ui',
|
||||
|
6
testsuite/reftests/picture-content-fit-contain.css
Normal file
6
testsuite/reftests/picture-content-fit-contain.css
Normal file
@ -0,0 +1,6 @@
|
||||
#reference {
|
||||
background-image: url("green-border-red-100x100.png");
|
||||
background-size: 200px 200px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
9
testsuite/reftests/picture-content-fit-contain.ref.ui
Normal file
9
testsuite/reftests/picture-content-fit-contain.ref.ui
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<property name="name">reference</property>
|
||||
</object>
|
||||
</interface>
|
14
testsuite/reftests/picture-content-fit-contain.ui
Normal file
14
testsuite/reftests/picture-content-fit-contain.ui
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-border-red-100x100.png</property>
|
||||
<property name="content-fit">contain</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/reftests/picture-content-fit-cover.css
Normal file
6
testsuite/reftests/picture-content-fit-cover.css
Normal file
@ -0,0 +1,6 @@
|
||||
#reference {
|
||||
background-image: url("green-border-red-100x100.png");
|
||||
background-size: 300px 300px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
9
testsuite/reftests/picture-content-fit-cover.ref.ui
Normal file
9
testsuite/reftests/picture-content-fit-cover.ref.ui
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<property name="name">reference</property>
|
||||
</object>
|
||||
</interface>
|
14
testsuite/reftests/picture-content-fit-cover.ui
Normal file
14
testsuite/reftests/picture-content-fit-cover.ui
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-border-red-100x100.png</property>
|
||||
<property name="content-fit">cover</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/reftests/picture-content-fit-fill.css
Normal file
6
testsuite/reftests/picture-content-fit-fill.css
Normal file
@ -0,0 +1,6 @@
|
||||
#reference {
|
||||
background-image: url("green-border-red-100x100.png");
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
9
testsuite/reftests/picture-content-fit-fill.ref.ui
Normal file
9
testsuite/reftests/picture-content-fit-fill.ref.ui
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<property name="name">reference</property>
|
||||
</object>
|
||||
</interface>
|
14
testsuite/reftests/picture-content-fit-fill.ui
Normal file
14
testsuite/reftests/picture-content-fit-fill.ui
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-border-red-100x100.png</property>
|
||||
<property name="content-fit">fill</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
6
testsuite/reftests/picture-content-fit-scale-down.css
Normal file
6
testsuite/reftests/picture-content-fit-scale-down.css
Normal file
@ -0,0 +1,6 @@
|
||||
#reference {
|
||||
background-image: url("green-border-red-100x100.png");
|
||||
background-size: 100px 100px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
9
testsuite/reftests/picture-content-fit-scale-down.ref.ui
Normal file
9
testsuite/reftests/picture-content-fit-scale-down.ref.ui
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<property name="name">reference</property>
|
||||
</object>
|
||||
</interface>
|
14
testsuite/reftests/picture-content-fit-scale-down.ui
Normal file
14
testsuite/reftests/picture-content-fit-scale-down.ui
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-border-red-100x100.png</property>
|
||||
<property name="content-fit">scale-down</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user