Add reftests for center layout
Add a test that checks behavior with invisible children, and another one that ensures we go back to box-like layout if min-size is forced.
This commit is contained in:
3
testsuite/reftests/centerlayout-invisible-child.css
Normal file
3
testsuite/reftests/centerlayout-invisible-child.css
Normal file
@@ -0,0 +1,3 @@
|
||||
box {
|
||||
border-spacing: 10px;
|
||||
}
|
||||
21
testsuite/reftests/centerlayout-invisible-child.ref.ui
Normal file
21
testsuite/reftests/centerlayout-invisible-child.ref.ui
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- 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="GtkCenterBox" id="box1">
|
||||
<child type="start">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes">Hello, Hello</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="label" translatable="yes">World</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
27
testsuite/reftests/centerlayout-invisible-child.ui
Normal file
27
testsuite/reftests/centerlayout-invisible-child.ui
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- 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="GtkCenterBox" id="box1">
|
||||
<child type="start">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes">Hello, Hello</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">0</property>
|
||||
<property name="label" translatable="yes">cruel</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="label" translatable="yes">World</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
3
testsuite/reftests/centerlayout-minsize.css
Normal file
3
testsuite/reftests/centerlayout-minsize.css
Normal file
@@ -0,0 +1,3 @@
|
||||
box {
|
||||
border-spacing: 10px;
|
||||
}
|
||||
26
testsuite/reftests/centerlayout-minsize.ref.ui
Normal file
26
testsuite/reftests/centerlayout-minsize.ref.ui
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- 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="GtkBox" id="box1">
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes">Hello, Hello</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="label" translatable="yes">cruel</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="label" translatable="yes">World</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
27
testsuite/reftests/centerlayout-minsize.ui
Normal file
27
testsuite/reftests/centerlayout-minsize.ui
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- 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>
|
||||
<property name="default-width">20</property>
|
||||
<child>
|
||||
<object class="GtkCenterBox" id="box1">
|
||||
<child type="start">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes">Hello, Hello</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="label" translatable="yes">cruel</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="label" translatable="yes">World</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -163,6 +163,12 @@ testdata = [
|
||||
'box-shadow-with-blend-mode.ui',
|
||||
'button-wrapping.ui',
|
||||
'button-wrapping.ref.ui',
|
||||
'centerlayout-invisible-child.css',
|
||||
'centerlayout-invisible-child.ref.ui',
|
||||
'centerlayout-invisible-child.ui',
|
||||
'centerlayout-minsize.css',
|
||||
'centerlayout-minsize.ref.ui',
|
||||
'centerlayout-minsize.ui',
|
||||
'color-transition.css',
|
||||
'color-transition.ref.ui',
|
||||
'color-transition.ui',
|
||||
|
||||
Reference in New Issue
Block a user