Add a reftest for grid layouts

This tests that invisible children don't influence
the layout.
This commit is contained in:
Matthias Clasen 2020-08-24 11:38:00 -04:00
parent 17dcb10707
commit 08f58122d1
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window_information_collection">
<property name="decorated">0</property>
<child>
<object class="GtkGrid" id="grid1">
<child>
<object class="GtkLabel" id="label1">
<property name="label" translatable="yes">Hello</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="label" translatable="yes">World</property>
<layout>
<property name="row">0</property>
<property name="column">2</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,39 @@
<!-- check that an invisible child does not influence the layout -->
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow" id="window_information_collection">
<property name="decorated">0</property>
<child>
<object class="GtkGrid" id="grid1">
<child>
<object class="GtkLabel" id="label1">
<property name="label" translatable="yes">Hello</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">0</property>
<property name="label" translatable="yes">cruel</property>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="label" translatable="yes">World</property>
<layout>
<property name="row">0</property>
<property name="column">2</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -229,6 +229,8 @@ testdata = [
'gradient-hard-stop.ref.ui',
'gradient-hard-stop.ui',
'green-20x20.png',
'gridlayout-invisible-child.ref.ui',
'gridlayout-invisible-child.ui',
'grid-empty-with-spacing.ref.ui',
'grid-empty-with-spacing.ui',
'grid-expand.css',