mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
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:
parent
a519a1a928
commit
d76fb63ba8
@ -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 \
|
||||
|
6
testsuite/css/nodes/box.ltr.nodes
Normal file
6
testsuite/css/nodes/box.ltr.nodes
Normal 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)
|
32
testsuite/css/nodes/box.ltr.ui
Normal file
32
testsuite/css/nodes/box.ltr.ui
Normal 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>
|
6
testsuite/css/nodes/box.rtl.nodes
Normal file
6
testsuite/css/nodes/box.rtl.nodes
Normal 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)
|
32
testsuite/css/nodes/box.rtl.ui
Normal file
32
testsuite/css/nodes/box.rtl.ui
Normal 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>
|
Loading…
Reference in New Issue
Block a user