mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
notebook: Implement rtl flipping for CSS nodes
Use gtk_box_gadget_reverse_children and gtk_css_node_reverse_children to flip the children of the header_gadget and the tabs_gadget when appropriate. Add new CSS node tests to verify that the node order is updated as expected in all cases.
This commit is contained in:
parent
0304817d81
commit
bb92428112
@ -219,6 +219,7 @@ struct _GtkNotebookPrivate
|
|||||||
guint show_tabs : 1;
|
guint show_tabs : 1;
|
||||||
guint scrollable : 1;
|
guint scrollable : 1;
|
||||||
guint tab_pos : 2;
|
guint tab_pos : 2;
|
||||||
|
guint tabs_reversed : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -1290,6 +1291,11 @@ gtk_notebook_init (GtkNotebook *notebook)
|
|||||||
priv->during_detach = FALSE;
|
priv->during_detach = FALSE;
|
||||||
priv->has_scrolled = FALSE;
|
priv->has_scrolled = FALSE;
|
||||||
|
|
||||||
|
if (gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL)
|
||||||
|
priv->tabs_reversed = TRUE;
|
||||||
|
else
|
||||||
|
priv->tabs_reversed = FALSE;
|
||||||
|
|
||||||
gtk_drag_dest_set (GTK_WIDGET (notebook), 0,
|
gtk_drag_dest_set (GTK_WIDGET (notebook), 0,
|
||||||
notebook_targets, G_N_ELEMENTS (notebook_targets),
|
notebook_targets, G_N_ELEMENTS (notebook_targets),
|
||||||
GDK_ACTION_MOVE);
|
GDK_ACTION_MOVE);
|
||||||
@ -1825,49 +1831,17 @@ static void
|
|||||||
update_node_ordering (GtkNotebook *notebook)
|
update_node_ordering (GtkNotebook *notebook)
|
||||||
{
|
{
|
||||||
GtkNotebookPrivate *priv = notebook->priv;
|
GtkNotebookPrivate *priv = notebook->priv;
|
||||||
GtkPositionType tab_pos;
|
gboolean reverse_tabs;
|
||||||
gboolean is_rtl;
|
|
||||||
GtkCssNode *node, *header_node, *tabs_node;
|
|
||||||
|
|
||||||
tab_pos = get_effective_tab_pos (notebook);
|
reverse_tabs = (priv->tab_pos == GTK_POS_TOP || priv->tab_pos == GTK_POS_BOTTOM) &&
|
||||||
is_rtl = gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL;
|
gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL;
|
||||||
header_node = gtk_css_gadget_get_node (priv->header_gadget);
|
|
||||||
tabs_node = gtk_css_gadget_get_node (priv->tabs_gadget);
|
|
||||||
|
|
||||||
switch (tab_pos)
|
if ((reverse_tabs && !priv->tabs_reversed) ||
|
||||||
|
(!reverse_tabs && priv->tabs_reversed))
|
||||||
{
|
{
|
||||||
case GTK_POS_TOP:
|
gtk_box_gadget_reverse_children (GTK_BOX_GADGET (priv->header_gadget));
|
||||||
case GTK_POS_BOTTOM:
|
gtk_css_node_reverse_children (gtk_css_gadget_get_node (priv->tabs_gadget));
|
||||||
if (priv->action_widget[ACTION_WIDGET_START])
|
priv->tabs_reversed = reverse_tabs;
|
||||||
{
|
|
||||||
node = gtk_widget_get_css_node (priv->action_widget[ACTION_WIDGET_START]);
|
|
||||||
if (is_rtl)
|
|
||||||
gtk_css_node_insert_after (header_node, node, tabs_node);
|
|
||||||
else
|
|
||||||
gtk_css_node_insert_before (header_node, node, tabs_node);
|
|
||||||
}
|
|
||||||
if (priv->action_widget[ACTION_WIDGET_END])
|
|
||||||
{
|
|
||||||
node = gtk_widget_get_css_node (priv->action_widget[ACTION_WIDGET_END]);
|
|
||||||
if (is_rtl)
|
|
||||||
gtk_css_node_insert_before (header_node, node, tabs_node);
|
|
||||||
else
|
|
||||||
gtk_css_node_insert_after (header_node, node, tabs_node);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GTK_POS_LEFT:
|
|
||||||
case GTK_POS_RIGHT:
|
|
||||||
if (priv->action_widget[ACTION_WIDGET_START])
|
|
||||||
{
|
|
||||||
node = gtk_widget_get_css_node (priv->action_widget[ACTION_WIDGET_START]);
|
|
||||||
gtk_css_node_insert_before (header_node, node, tabs_node);
|
|
||||||
}
|
|
||||||
if (priv->action_widget[ACTION_WIDGET_END])
|
|
||||||
{
|
|
||||||
node = gtk_widget_get_css_node (priv->action_widget[ACTION_WIDGET_END]);
|
|
||||||
gtk_css_node_insert_after (header_node, node, tabs_node);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4767,6 +4741,9 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
|
|||||||
else
|
else
|
||||||
sibling = priv->arrow_gadget[ARROW_RIGHT_AFTER];
|
sibling = priv->arrow_gadget[ARROW_RIGHT_AFTER];
|
||||||
|
|
||||||
|
if (priv->tabs_reversed)
|
||||||
|
gtk_css_node_reverse_children (gtk_css_gadget_get_node (priv->tabs_gadget));
|
||||||
|
|
||||||
page->gadget = gtk_css_custom_gadget_new ("tab",
|
page->gadget = gtk_css_custom_gadget_new ("tab",
|
||||||
GTK_WIDGET (notebook),
|
GTK_WIDGET (notebook),
|
||||||
priv->tabs_gadget,
|
priv->tabs_gadget,
|
||||||
@ -4776,6 +4753,9 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
|
|||||||
draw_tab,
|
draw_tab,
|
||||||
page,
|
page,
|
||||||
NULL);
|
NULL);
|
||||||
|
if (priv->tabs_reversed)
|
||||||
|
gtk_css_node_reverse_children (gtk_css_gadget_get_node (priv->tabs_gadget));
|
||||||
|
|
||||||
gtk_css_gadget_set_state (page->gadget, gtk_css_node_get_state (gtk_css_gadget_get_node (priv->tabs_gadget)));
|
gtk_css_gadget_set_state (page->gadget, gtk_css_node_get_state (gtk_css_gadget_get_node (priv->tabs_gadget)));
|
||||||
|
|
||||||
if (!tab_label)
|
if (!tab_label)
|
||||||
@ -7050,6 +7030,8 @@ gtk_notebook_update_tab_pos (GtkNotebook *notebook)
|
|||||||
gtk_box_gadget_set_orientation (GTK_BOX_GADGET (priv->header_gadget), GTK_ORIENTATION_VERTICAL);
|
gtk_box_gadget_set_orientation (GTK_BOX_GADGET (priv->header_gadget), GTK_ORIENTATION_VERTICAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_node_ordering (notebook);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -8017,14 +7999,19 @@ gtk_notebook_set_action_widget (GtkNotebook *notebook,
|
|||||||
|
|
||||||
if (widget)
|
if (widget)
|
||||||
{
|
{
|
||||||
|
int pos;
|
||||||
|
|
||||||
gtk_css_node_set_parent (gtk_widget_get_css_node (widget),
|
gtk_css_node_set_parent (gtk_widget_get_css_node (widget),
|
||||||
gtk_css_gadget_get_node (priv->header_gadget));
|
gtk_css_gadget_get_node (priv->header_gadget));
|
||||||
gtk_box_gadget_insert_widget (GTK_BOX_GADGET (priv->header_gadget),
|
|
||||||
pack_type == GTK_PACK_START ? 0 : -1,
|
if (priv->tabs_reversed)
|
||||||
widget);
|
pos = pack_type == GTK_PACK_START ? -1 : 0;
|
||||||
|
else
|
||||||
|
pos = pack_type == GTK_PACK_START ? 0 : -1;
|
||||||
|
|
||||||
|
gtk_box_gadget_insert_widget (GTK_BOX_GADGET (priv->header_gadget), pos, widget);
|
||||||
gtk_widget_set_child_visible (widget, priv->show_tabs);
|
gtk_widget_set_child_visible (widget, priv->show_tabs);
|
||||||
gtk_widget_set_parent (widget, GTK_WIDGET (notebook));
|
gtk_widget_set_parent (widget, GTK_WIDGET (notebook));
|
||||||
update_node_ordering (notebook);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||||
|
@ -28,23 +28,27 @@ test_css_nodes_SOURCES = \
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
test_data = \
|
test_data = \
|
||||||
box.ltr.ui box.ltr.nodes \
|
box.ltr.ui box.ltr.nodes \
|
||||||
box.rtl.ui box.rtl.nodes \
|
box.rtl.ui box.rtl.nodes \
|
||||||
buttons.ui buttons.nodes \
|
buttons.ui buttons.nodes \
|
||||||
checkbutton.ltr.ui checkbutton.ltr.nodes \
|
checkbutton.ltr.ui checkbutton.ltr.nodes \
|
||||||
checkbutton.rtl.ui checkbutton.rtl.nodes \
|
checkbutton.rtl.ui checkbutton.rtl.nodes \
|
||||||
entries.ui entries.nodes \
|
entries.ui entries.nodes \
|
||||||
expander.ltr.ui expander.ltr.nodes \
|
expander.ltr.ui expander.ltr.nodes \
|
||||||
expander.rtl.ui expander.rtl.nodes \
|
expander.rtl.ui expander.rtl.nodes \
|
||||||
levelbar.ltr.ui levelbar.ltr.nodes \
|
levelbar.ltr.ui levelbar.ltr.nodes \
|
||||||
levelbar.rtl.ui levelbar.rtl.nodes \
|
levelbar.rtl.ui levelbar.rtl.nodes \
|
||||||
notebook.top.ui notebook.top.nodes \
|
notebook.top.ltr.ui notebook.top.ltr.nodes \
|
||||||
notebook.left.ui notebook.left.nodes \
|
notebook.top.rtl.ui notebook.top.rtl.nodes \
|
||||||
notebook.right.ui notebook.right.nodes \
|
notebook.left.ltr.ui notebook.left.ltr.nodes \
|
||||||
notebook.bottom.ui notebook.bottom.nodes \
|
notebook.left.rtl.ui notebook.left.rtl.nodes \
|
||||||
paned.ltr.ui paned.ltr.nodes \
|
notebook.right.ltr.ui notebook.right.ltr.nodes \
|
||||||
paned.rtl.ui paned.rtl.nodes \
|
notebook.right.rtl.ui notebook.right.rtl.nodes \
|
||||||
progressbar.ui progressbar.nodes \
|
notebook.bottom.ltr.ui notebook.bottom.ltr.nodes \
|
||||||
|
notebook.bottom.rtl.ui notebook.bottom.rtl.nodes \
|
||||||
|
paned.ltr.ui paned.ltr.nodes \
|
||||||
|
paned.rtl.ui paned.rtl.nodes \
|
||||||
|
progressbar.ui progressbar.nodes \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXTRA_DIST += $(test_in_files) $(test_data)
|
EXTRA_DIST += $(test_in_files) $(test_data)
|
||||||
|
18
testsuite/css/nodes/notebook.bottom.rtl.nodes
Normal file
18
testsuite/css/nodes/notebook.bottom.rtl.nodes
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[window.background:dir(rtl)]
|
||||||
|
decoration:dir(ltr)
|
||||||
|
notebook.frame:dir(rtl)
|
||||||
|
stack:dir(ltr)
|
||||||
|
button#page1.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
button#page2.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
header.bottom:dir(ltr)
|
||||||
|
button#end.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
tabs:dir(ltr)
|
||||||
|
tab:dir(ltr)
|
||||||
|
label#tab2:dir(ltr)
|
||||||
|
tab:active:dir(ltr)
|
||||||
|
label#tab1:dir(ltr)
|
||||||
|
button#start.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
56
testsuite/css/nodes/notebook.bottom.rtl.ui
Normal file
56
testsuite/css/nodes/notebook.bottom.rtl.ui
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?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="GtkNotebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tab-pos">bottom</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="label" translatable="yes">Yes</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="name">tab1</property>
|
||||||
|
<property name="label" translatable="yes">Tab 1</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="label" translatable="yes">No</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel" id="tab2">
|
||||||
|
<property name="name">tab2</property>
|
||||||
|
<property name="label" translatable="yes">Tab 2</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-start">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">start</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-end">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">end</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
18
testsuite/css/nodes/notebook.left.rtl.nodes
Normal file
18
testsuite/css/nodes/notebook.left.rtl.nodes
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[window.background:dir(rtl)]
|
||||||
|
decoration:dir(ltr)
|
||||||
|
notebook.frame:dir(rtl)
|
||||||
|
stack:dir(ltr)
|
||||||
|
button#page1.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
button#page2.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
header.right:dir(ltr)
|
||||||
|
button#start.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
tabs:dir(ltr)
|
||||||
|
tab:active:dir(ltr)
|
||||||
|
label#tab1:dir(ltr)
|
||||||
|
tab:dir(ltr)
|
||||||
|
label#tab2:dir(ltr)
|
||||||
|
button#end.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
56
testsuite/css/nodes/notebook.left.rtl.ui
Normal file
56
testsuite/css/nodes/notebook.left.rtl.ui
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?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="GtkNotebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tab-pos">left</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="label" translatable="yes">Yes</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="name">tab1</property>
|
||||||
|
<property name="label" translatable="yes">Tab 1</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="label" translatable="yes">No</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel" id="tab2">
|
||||||
|
<property name="name">tab2</property>
|
||||||
|
<property name="label" translatable="yes">Tab 2</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-start">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">start</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-end">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">end</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
18
testsuite/css/nodes/notebook.right.rtl.nodes
Normal file
18
testsuite/css/nodes/notebook.right.rtl.nodes
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[window.background:dir(rtl)]
|
||||||
|
decoration:dir(ltr)
|
||||||
|
notebook.frame:dir(rtl)
|
||||||
|
header.left:dir(ltr)
|
||||||
|
button#start.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
tabs:dir(ltr)
|
||||||
|
tab:active:dir(ltr)
|
||||||
|
label#tab1:dir(ltr)
|
||||||
|
tab:dir(ltr)
|
||||||
|
label#tab2:dir(ltr)
|
||||||
|
button#end.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
stack:dir(ltr)
|
||||||
|
button#page1.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
button#page2.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
56
testsuite/css/nodes/notebook.right.rtl.ui
Normal file
56
testsuite/css/nodes/notebook.right.rtl.ui
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?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="GtkNotebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tab-pos">right</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="label" translatable="yes">Yes</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="name">tab1</property>
|
||||||
|
<property name="label" translatable="yes">Tab 1</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="label" translatable="yes">No</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel" id="tab2">
|
||||||
|
<property name="name">tab2</property>
|
||||||
|
<property name="label" translatable="yes">Tab 2</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-start">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">start</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-end">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">end</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
18
testsuite/css/nodes/notebook.top.rtl.nodes
Normal file
18
testsuite/css/nodes/notebook.top.rtl.nodes
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[window.background:dir(rtl)]
|
||||||
|
decoration:dir(ltr)
|
||||||
|
notebook.frame:dir(rtl)
|
||||||
|
header.top:dir(ltr)
|
||||||
|
button#end.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
tabs:dir(ltr)
|
||||||
|
tab:dir(ltr)
|
||||||
|
label#tab2:dir(ltr)
|
||||||
|
tab:active:dir(ltr)
|
||||||
|
label#tab1:dir(ltr)
|
||||||
|
button#start.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
stack:dir(ltr)
|
||||||
|
button#page1.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
||||||
|
button#page2.text-button:dir(rtl)
|
||||||
|
label:dir(ltr)
|
55
testsuite/css/nodes/notebook.top.rtl.ui
Normal file
55
testsuite/css/nodes/notebook.top.rtl.ui
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?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="GtkNotebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page1</property>
|
||||||
|
<property name="label" translatable="yes">Yes</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="name">tab1</property>
|
||||||
|
<property name="label" translatable="yes">Tab 1</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="label" translatable="yes">No</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel" id="tab2">
|
||||||
|
<property name="name">tab2</property>
|
||||||
|
<property name="label" translatable="yes">Tab 2</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-start">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">start</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action-end">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="name">end</property>
|
||||||
|
<property name="label" translatable="yes">Action</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
Reference in New Issue
Block a user