mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 15:14:17 +00:00
Merge branch 'fix-picture-natural-size-0' into 'main'
picture: Return natural size 0 for size 0 See merge request GNOME/gtk!4177
This commit is contained in:
commit
17c903e246
@ -178,7 +178,8 @@ gtk_picture_measure (GtkWidget *widget,
|
||||
double min_width, min_height, nat_width, nat_height;
|
||||
double default_size;
|
||||
|
||||
if (self->paintable == NULL)
|
||||
/* for_size = 0 below is treated as -1, but we want to return zeros. */
|
||||
if (self->paintable == NULL || for_size == 0)
|
||||
{
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100px 100px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="default-width">100</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100px 100px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-100x100.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100px 100px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -11,5 +11,5 @@ picture {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 150px 150px;
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="default-width">100</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 150px 150px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-150x150.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100px 100px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -11,5 +11,5 @@ picture {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 200px 200px;
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="default-width">100</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 200px 200px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-200x200.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 20px 20px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="default-width">100</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 20px 20px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-20x20.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100px 100px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -11,5 +11,5 @@ picture {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 300px 300px;
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="default-width">100</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -0,0 +1,15 @@
|
||||
* {
|
||||
all: unset;
|
||||
background-color: mintcream;
|
||||
}
|
||||
|
||||
picture {
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
#reference {
|
||||
background-image: image(lime);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 300px 300px;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="name">reference</property>
|
||||
<property name="decorated">0</property>
|
||||
</object>
|
||||
</interface>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="width_request">200</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">100</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<layout>
|
||||
<property name="measure">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkPicture">
|
||||
<property name="paintable">green-300x300.png</property>
|
||||
<property name="keep-aspect-ratio">0</property>
|
||||
<property name="can-shrink">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -173,35 +173,65 @@ testdata = [
|
||||
'button-wrapping.ui',
|
||||
'button-wrapping.ref.ui',
|
||||
'center-center-100x100-picture-in-100x200.css',
|
||||
'center-center-100x100-picture-in-100x200-overlay.css',
|
||||
'center-center-100x100-picture-in-100x200.ref.ui',
|
||||
'center-center-100x100-picture-in-100x200-overlay.ref.ui',
|
||||
'center-center-100x100-picture-in-100x200.ui',
|
||||
'center-center-100x100-picture-in-100x200-overlay.ui',
|
||||
'center-center-100x100-picture-in-200x100.css',
|
||||
'center-center-100x100-picture-in-200x100-overlay.css',
|
||||
'center-center-100x100-picture-in-200x100.ref.ui',
|
||||
'center-center-100x100-picture-in-200x100-overlay.ref.ui',
|
||||
'center-center-100x100-picture-in-200x100.ui',
|
||||
'center-center-100x100-picture-in-200x100-overlay.ui',
|
||||
'center-center-150x150-picture-in-100x200.css',
|
||||
'center-center-150x150-picture-in-100x200-overlay.css',
|
||||
'center-center-150x150-picture-in-100x200.ref.ui',
|
||||
'center-center-150x150-picture-in-100x200-overlay.ref.ui',
|
||||
'center-center-150x150-picture-in-100x200.ui',
|
||||
'center-center-150x150-picture-in-100x200-overlay.ui',
|
||||
'center-center-150x150-picture-in-200x100.css',
|
||||
'center-center-150x150-picture-in-200x100-overlay.css',
|
||||
'center-center-150x150-picture-in-200x100.ref.ui',
|
||||
'center-center-150x150-picture-in-200x100-overlay.ref.ui',
|
||||
'center-center-150x150-picture-in-200x100.ui',
|
||||
'center-center-150x150-picture-in-200x100-overlay.ui',
|
||||
'center-center-200x200-picture-in-100x200.css',
|
||||
'center-center-200x200-picture-in-100x200-overlay.css',
|
||||
'center-center-200x200-picture-in-100x200.ref.ui',
|
||||
'center-center-200x200-picture-in-100x200-overlay.ref.ui',
|
||||
'center-center-200x200-picture-in-100x200.ui',
|
||||
'center-center-200x200-picture-in-100x200-overlay.ui',
|
||||
'center-center-200x200-picture-in-200x100.css',
|
||||
'center-center-200x200-picture-in-200x100-overlay.css',
|
||||
'center-center-200x200-picture-in-200x100.ref.ui',
|
||||
'center-center-200x200-picture-in-200x100-overlay.ref.ui',
|
||||
'center-center-200x200-picture-in-200x100.ui',
|
||||
'center-center-200x200-picture-in-200x100-overlay.ui',
|
||||
'center-center-20x20-picture-in-100x200.css',
|
||||
'center-center-20x20-picture-in-100x200-overlay.css',
|
||||
'center-center-20x20-picture-in-100x200.ref.ui',
|
||||
'center-center-20x20-picture-in-100x200-overlay.ref.ui',
|
||||
'center-center-20x20-picture-in-100x200.ui',
|
||||
'center-center-20x20-picture-in-100x200-overlay.ui',
|
||||
'center-center-20x20-picture-in-200x100.css',
|
||||
'center-center-20x20-picture-in-200x100-overlay.css',
|
||||
'center-center-20x20-picture-in-200x100.ref.ui',
|
||||
'center-center-20x20-picture-in-200x100-overlay.ref.ui',
|
||||
'center-center-20x20-picture-in-200x100.ui',
|
||||
'center-center-20x20-picture-in-200x100-overlay.ui',
|
||||
'center-center-300x300-picture-in-100x200.css',
|
||||
'center-center-300x300-picture-in-100x200-overlay.css',
|
||||
'center-center-300x300-picture-in-100x200.ref.ui',
|
||||
'center-center-300x300-picture-in-100x200-overlay.ref.ui',
|
||||
'center-center-300x300-picture-in-100x200.ui',
|
||||
'center-center-300x300-picture-in-100x200-overlay.ui',
|
||||
'center-center-300x300-picture-in-200x100.css',
|
||||
'center-center-300x300-picture-in-200x100-overlay.css',
|
||||
'center-center-300x300-picture-in-200x100.ref.ui',
|
||||
'center-center-300x300-picture-in-200x100-overlay.ref.ui',
|
||||
'center-center-300x300-picture-in-200x100.ui',
|
||||
'center-center-300x300-picture-in-200x100-overlay.ui',
|
||||
'centerlayout-invisible-child.css',
|
||||
'centerlayout-invisible-child.ref.ui',
|
||||
'centerlayout-invisible-child.ui',
|
||||
|
Loading…
Reference in New Issue
Block a user