diff --git a/src/ui/theme.c b/src/ui/theme.c index 0dbfdf6e0..2f527fb24 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -992,6 +992,7 @@ create_style_context (GType widget_type, ...) { GtkStyleContext *style; + GtkStateFlags state; GtkWidgetPath *path; const char *name; va_list ap; @@ -1010,6 +1011,19 @@ create_style_context (GType widget_type, if (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); for (name = first_class; name; name = va_arg (ap, const char *)) gtk_widget_path_iter_add_class (path, -1, name);