diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-10-21 09:53:05 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2009-03-08 13:18:03 +0100 |
commit | 6fc0eb16dbe0461b0d838b53b3e7ab1fc0a19adb (patch) | |
tree | 92c29e8d2a4e73aabfc503f2911eb4061e55b578 /gtk | |
parent | 0abc1a2a87b6fe5511b9ae19bc784bba7e00eb87 (diff) | |
download | zcomp-6fc0eb16dbe0461b0d838b53b3e7ab1fc0a19adb.tar.gz zcomp-6fc0eb16dbe0461b0d838b53b3e7ab1fc0a19adb.tar.bz2 |
Align window menu to the right for RTL languages.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/window-decorator/gtk-window-decorator.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c index 0c83eba..2dbc64f 100644 --- a/gtk/window-decorator/gtk-window-decorator.c +++ b/gtk/window-decorator/gtk-window-decorator.c @@ -4500,7 +4500,7 @@ position_action_menu (GtkMenu *menu, { WnckWindow *win = (WnckWindow *) user_data; decor_t *d = g_object_get_data (G_OBJECT (win), "decor"); - gint bx, by, width, height; + gint bx, by, width, height; wnck_window_get_client_window_geometry (win, x, y, &width, &height); @@ -4508,6 +4508,14 @@ position_action_menu (GtkMenu *menu, &bx, &by, &width, &height)) *x = *x - _win_extents.left + bx; + if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) + { + GtkRequisition req; + + gtk_widget_size_request (GTK_WIDGET (menu), &req); + *x = MAX (0, *x - req.width + width); + } + *push_in = TRUE; } |