mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
theme: set RTL/LTR flags on the style context
https://bugzilla.gnome.org/show_bug.cgi?id=764807
This commit is contained in:
parent
75e6029206
commit
150732a894
@ -992,6 +992,7 @@ create_style_context (GType widget_type,
|
|||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
GtkStyleContext *style;
|
GtkStyleContext *style;
|
||||||
|
GtkStateFlags state;
|
||||||
GtkWidgetPath *path;
|
GtkWidgetPath *path;
|
||||||
const char *name;
|
const char *name;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
@ -1010,6 +1011,19 @@ create_style_context (GType widget_type,
|
|||||||
if (object_name)
|
if (object_name)
|
||||||
gtk_widget_path_iter_set_object_name (path, -1, object_name);
|
gtk_widget_path_iter_set_object_name (path, -1, object_name);
|
||||||
|
|
||||||
|
state = gtk_style_context_get_state (style);
|
||||||
|
if (meta_get_locale_direction() == META_LOCALE_DIRECTION_RTL)
|
||||||
|
{
|
||||||
|
state |= GTK_STATE_FLAG_DIR_RTL;
|
||||||
|
state &= ~GTK_STATE_FLAG_DIR_LTR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
state |= GTK_STATE_FLAG_DIR_LTR;
|
||||||
|
state &= ~GTK_STATE_FLAG_DIR_RTL;
|
||||||
|
}
|
||||||
|
gtk_style_context_set_state (style, state);
|
||||||
|
|
||||||
va_start (ap, first_class);
|
va_start (ap, first_class);
|
||||||
for (name = first_class; name; name = va_arg (ap, const char *))
|
for (name = first_class; name; name = va_arg (ap, const char *))
|
||||||
gtk_widget_path_iter_add_class (path, -1, name);
|
gtk_widget_path_iter_add_class (path, -1, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user