From 8db7faf281abef276b1e84a2504191cbd3ce2606 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 15 Oct 2006 15:03:17 +0000 Subject: [PATCH] Correct window placement only once. This fixes edit label control placement in wxListCtrl in RTL. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/win_gtk.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index 37def45a86..7e19cae8af 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -277,12 +277,6 @@ gtk_pizza_put (GtkPizza *pizza, g_return_if_fail (GTK_IS_PIZZA (pizza)); g_return_if_fail (widget != NULL); - if (gtk_widget_get_direction( GTK_WIDGET(pizza) ) == GTK_TEXT_DIR_RTL) - { - /* reverse horizontal placement */ - x = GTK_WIDGET(pizza)->allocation.width - x - width; - } - child_info = g_new (GtkPizzaChild, 1); child_info->widget = widget; @@ -294,11 +288,12 @@ gtk_pizza_put (GtkPizza *pizza, pizza->children = g_list_append (pizza->children, child_info); if (GTK_WIDGET_REALIZED (pizza)) - gtk_widget_set_parent_window (widget, pizza->bin_window); + gtk_widget_set_parent_window (widget, pizza->bin_window); gtk_widget_set_parent (widget, GTK_WIDGET (pizza)); - gtk_widget_set_size_request (widget, width, height); + if (GTK_WIDGET_REALIZED (pizza)) + gtk_pizza_allocate_child (pizza, child_info); } void @@ -541,6 +536,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; -- 2.45.2