mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Right-justify labels in rtl mode. (#129071, chinen@jp.ibm.com)
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels in rtl mode. (#129071, chinen@jp.ibm.com) Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl mode. (#107528)
This commit is contained in:
parent
6c935950b2
commit
362158dc78
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
|
||||
in rtl mode. (#129071, chinen@jp.ibm.com)
|
||||
|
||||
Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
|
||||
meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
|
||||
mode. (#107528)
|
||||
|
||||
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Clip narrow columns in rtl-oriented tree views (#128089,
|
||||
|
@ -1,3 +1,14 @@
|
||||
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
|
||||
in rtl mode. (#129071, chinen@jp.ibm.com)
|
||||
|
||||
Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
|
||||
meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
|
||||
mode. (#107528)
|
||||
|
||||
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Clip narrow columns in rtl-oriented tree views (#128089,
|
||||
|
@ -1,3 +1,14 @@
|
||||
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
|
||||
in rtl mode. (#129071, chinen@jp.ibm.com)
|
||||
|
||||
Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
|
||||
meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
|
||||
mode. (#107528)
|
||||
|
||||
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Clip narrow columns in rtl-oriented tree views (#128089,
|
||||
|
@ -1,3 +1,14 @@
|
||||
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
|
||||
in rtl mode. (#129071, chinen@jp.ibm.com)
|
||||
|
||||
Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
|
||||
meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
|
||||
mode. (#107528)
|
||||
|
||||
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Clip narrow columns in rtl-oriented tree views (#128089,
|
||||
|
@ -1,3 +1,14 @@
|
||||
Tue Feb 3 02:04:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
|
||||
in rtl mode. (#129071, chinen@jp.ibm.com)
|
||||
|
||||
Tue Feb 3 02:01:25 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
|
||||
meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
|
||||
mode. (#107528)
|
||||
|
||||
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
Clip narrow columns in rtl-oriented tree views (#128089,
|
||||
|
@ -1408,9 +1408,11 @@ gtk_label_ensure_layout (GtkLabel *label)
|
||||
GtkWidget *widget;
|
||||
PangoRectangle logical_rect;
|
||||
gint rwidth, rheight;
|
||||
gboolean rtl;
|
||||
|
||||
widget = GTK_WIDGET (label);
|
||||
|
||||
rtl = gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL;
|
||||
rwidth = label->misc.xpad * 2;
|
||||
rheight = label->misc.ypad * 2;
|
||||
|
||||
@ -1426,17 +1428,17 @@ gtk_label_ensure_layout (GtkLabel *label)
|
||||
switch (label->jtype)
|
||||
{
|
||||
case GTK_JUSTIFY_LEFT:
|
||||
align = PANGO_ALIGN_LEFT;
|
||||
align = rtl ? PANGO_ALIGN_RIGHT : PANGO_ALIGN_LEFT;
|
||||
break;
|
||||
case GTK_JUSTIFY_RIGHT:
|
||||
align = PANGO_ALIGN_RIGHT;
|
||||
align = rtl ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT;
|
||||
break;
|
||||
case GTK_JUSTIFY_CENTER:
|
||||
align = PANGO_ALIGN_CENTER;
|
||||
break;
|
||||
case GTK_JUSTIFY_FILL:
|
||||
/* FIXME: This just doesn't work to do this */
|
||||
align = PANGO_ALIGN_LEFT;
|
||||
align = rtl ? PANGO_ALIGN_RIGHT : PANGO_ALIGN_LEFT;
|
||||
pango_layout_set_justify (label->layout, TRUE);
|
||||
break;
|
||||
default:
|
||||
|
@ -1042,6 +1042,28 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
if (menu_shell->parent_menu_shell)
|
||||
parent_menu_shell = GTK_MENU_SHELL (menu_shell->parent_menu_shell);
|
||||
|
||||
if (gtk_widget_get_direction (GTK_WIDGET (menu_shell)) == GTK_TEXT_DIR_RTL)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case GTK_MENU_DIR_PARENT:
|
||||
direction = GTK_MENU_DIR_CHILD;
|
||||
break;
|
||||
case GTK_MENU_DIR_CHILD:
|
||||
direction = GTK_MENU_DIR_PARENT;
|
||||
break;
|
||||
case GTK_MENU_DIR_PREV:
|
||||
if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
direction = GTK_MENU_DIR_NEXT;
|
||||
break;
|
||||
case GTK_MENU_DIR_NEXT:
|
||||
if (GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement == GTK_TOP_BOTTOM)
|
||||
direction = GTK_MENU_DIR_PREV;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case GTK_MENU_DIR_PARENT:
|
||||
|
Loading…
Reference in New Issue
Block a user