mirror of
https://github.com/brl/mutter.git
synced 2024-11-08 23:16:20 -05:00
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:
parent
45966f581b
commit
1004bd8b60
@ -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
|
||||
|
@ -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);
|
||||
widget->allocation.width += ac_width;
|
||||
|
||||
x = widget->allocation.x + widget->allocation.width - misc->xpad - ac_width;
|
||||
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 -
|
||||
|
Loading…
Reference in New Issue
Block a user