reftests: Add content-fit picture tests

This commit is contained in:
Marco Melorio 2022-07-16 16:47:17 +02:00
parent 9cc7dbe9c9
commit 6da65b25b6
14 changed files with 128 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

View File

@ -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',

View 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;
}

View 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>

View 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>

View 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;
}

View 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>

View 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>

View 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;
}

View 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>

View 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>

View 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;
}

View 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>

View 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>