Flip the padding

This commit is contained in:
Matthias Clasen 2005-05-10 03:44:02 +00:00
parent 485fd85179
commit 0a28c9f678
4 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2005-05-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_size_allocate): Flip the
padding in RTL mode. (#303572, Maciej Katafiasz)
2005-05-09 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):

View File

@ -1,3 +1,8 @@
2005-05-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_size_allocate): Flip the
padding in RTL mode. (#303572, Maciej Katafiasz)
2005-05-09 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):

View File

@ -1,3 +1,8 @@
2005-05-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkalignment.c (gtk_alignment_size_allocate): Flip the
padding in RTL mode. (#303572, Maciej Katafiasz)
2005-05-09 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):

View File

@ -479,7 +479,6 @@ gtk_alignment_size_allocate (GtkWidget *widget,
gint border_width;
gint padding_horizontal, padding_vertical;
GtkAlignmentPrivate *priv;
gfloat xalign;
padding_horizontal = 0;
padding_vertical = 0;
@ -515,11 +514,11 @@ gtk_alignment_size_allocate (GtkWidget *widget,
else
child_allocation.height = height;
xalign = alignment->xalign;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
xalign = 1.0 - xalign;
child_allocation.x = (1.0 - alignment->xalign) * (width - child_allocation.width) + allocation->x + border_width + priv->padding_right;
else
child_allocation.x = alignment->xalign * (width - child_allocation.width) + allocation->x + border_width + priv->padding_left;
child_allocation.x = xalign * (width - child_allocation.width) + allocation->x + border_width + priv->padding_left;
child_allocation.y = alignment->yalign * (height - child_allocation.height) + allocation->y + border_width + priv->padding_top;
gtk_widget_size_allocate (bin->child, &child_allocation);