X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de4a74e2d01d600081c50a087c313a770906b560..adbd3cbc71cde23d1a12b76e820aa3fd33a6707f:/src/gtk/win_gtk.c diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index b77c9a2768..2b6944fb3e 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -258,11 +258,11 @@ gint gtk_pizza_get_rtl_offset (GtkPizza *pizza) g_return_val_if_fail ( (pizza != NULL), 0 ); g_return_val_if_fail ( (GTK_IS_PIZZA (pizza)), 0 ); - + if (!pizza->bin_window) return 0; - + border = pizza->container.border_width; - + return GTK_WIDGET(pizza)->allocation.width - border*2; } @@ -340,8 +340,12 @@ gtk_pizza_set_size (GtkPizza *pizza, if (child->widget == widget) { - child->x = x; - child->y = y; + if (child->x != x || child->y != y) + { + child->x = x; + child->y = y; + gtk_widget_queue_resize(widget); + } gtk_widget_set_size_request (widget, width, height); @@ -540,7 +544,7 @@ gtk_pizza_size_allocate (GtkWidget *widget, widget->allocation = *allocation; border = pizza->container.border_width; - + x = allocation->x + border; y = allocation->y + border; w = allocation->width - border*2; @@ -675,15 +679,15 @@ gtk_pizza_allocate_child (GtkPizza *pizza, if (gtk_widget_get_direction( GTK_WIDGET(pizza) ) == GTK_TEXT_DIR_RTL) { /* reverse horizontal placement */ - gint offset,border; - + gint offset,border; + offset = GTK_WIDGET(pizza)->allocation.width; border = pizza->container.border_width; offset -= border*2; - - allocation.x = offset - child->x - allocation.width + pizza->m_xoffset; + + allocation.x = offset - child->x - allocation.width + pizza->m_xoffset; } - + gtk_widget_size_allocate (child->widget, &allocation); }