Add a test for ltr vs rtl boxes.

This tests that horizontal boxes flip their child nodes
according to text direction to maintain the left-to-right
ordering of child nodes for both text directions.
This commit is contained in:
Matthias Clasen 2016-01-05 23:24:51 -05:00
parent a519a1a928
commit d76fb63ba8
5 changed files with 78 additions and 0 deletions

View File

@ -28,6 +28,8 @@ test_css_nodes_SOURCES = \
$(NULL)
test_data = \
box.ltr.ui box.ltr.nodes \
box.rtl.ui box.rtl.nodes \
buttons.ui buttons.nodes \
entries.ui entries.nodes \
levelbar.ui levelbar.nodes \

View File

@ -0,0 +1,6 @@
[window.background:dir(ltr)]
decoration:dir(ltr)
box.horizontal:dir(ltr)
label#label1:dir(ltr)
label#label2:dir(ltr)
label#label3:dir(ltr)

View File

@ -0,0 +1,32 @@
<?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">label1</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label2</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label3</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#label3:dir(ltr)
label#label2:dir(ltr)
label#label1:dir(ltr)

View File

@ -0,0 +1,32 @@
<?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">label1</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label2</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="name">label3</property>
</object>
</child>
</object>
</child>
</object>
</interface>