Add css node tests for box packing

More tests to ensure that CSS node order is always physical
left-to-right.
This commit is contained in:
Matthias Clasen 2016-02-08 09:15:39 +01:00
parent 486a0a467d
commit e0f31ab7bb
5 changed files with 90 additions and 0 deletions

View File

@ -30,6 +30,8 @@ test_css_nodes_SOURCES = \
test_data = \
box.ltr.ui box.ltr.nodes \
box.rtl.ui box.rtl.nodes \
box-packing.ltr.ui box-packing.ltr.nodes \
box-packing.rtl.ui box-packing.rtl.nodes \
buttons.ui buttons.nodes \
checkbutton.ltr.ui checkbutton.ltr.nodes \
checkbutton.rtl.ui checkbutton.rtl.nodes \

View File

@ -0,0 +1,6 @@
[window.background:dir(ltr)]
decoration:dir(ltr)
box.horizontal:dir(ltr)
label#start:dir(ltr)
label#center:dir(ltr)
label#end:dir(ltr)

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">end</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">start</property>
</object>
<packing>
<property name="pack-type">start</property>
</packing>
</child>
<child type="center">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">center</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,6 @@
[window.background:dir(rtl)]
decoration:dir(ltr)
box.horizontal:dir(rtl)
label#end:dir(ltr)
label#center:dir(ltr)
label#start:dir(ltr)

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="type">popup</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">end</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">start</property>
</object>
<packing>
<property name="pack-type">start</property>
</packing>
</child>
<child type="center">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">center</property>
</object>
</child>
</object>
</child>
</object>
</interface>