fix label layout for RTL languages. Closes #433400.

2007-06-04  Thomas Thurman  <thomas@thurman.org.uk>

        * src/metaaccellabel.c (meta_accel_label_expose_event): fix
        label layout for RTL languages. Closes #433400.


svn path=/trunk/; revision=3228
This commit is contained in:
Thomas Thurman 2007-06-04 12:50:50 +00:00 committed by Thomas James Alexander Thurman
parent 45966f581b
commit 1004bd8b60
2 changed files with 27 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2007-06-04 Thomas Thurman <thomas@thurman.org.uk>
* src/metaaccellabel.c (meta_accel_label_expose_event): fix
label layout for RTL languages. Closes #433400.
2007-06-03 Thomas Thurman <thomas@thurman.org.uk>
* src/frames.c (meta_frames_ensure_layout): Pango layout for

View File

@ -271,15 +271,33 @@ meta_accel_label_expose_event (GtkWidget *widget,
if (widget->allocation.width >= widget->requisition.width + ac_width)
{
int x;
int y;
GtkTextDirection direction = gtk_widget_get_direction (widget);
gint x;
gint y;
if (direction == GTK_TEXT_DIR_RTL)
{
widget->allocation.x += ac_width;
}
widget->allocation.width -= ac_width;
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (direction == GTK_TEXT_DIR_RTL)
{
widget->allocation.x -= ac_width;
}
widget->allocation.width += ac_width;
if (direction == GTK_TEXT_DIR_RTL)
{
x = widget->allocation.x + misc->xpad;
}
else
{
x = widget->allocation.x + widget->allocation.width - misc->xpad - ac_width;
}
y = (widget->allocation.y * (1.0 - misc->yalign) +
(widget->allocation.y + widget->allocation.height -