]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct window placement only once.
authorRobert Roebling <robert@roebling.de>
Sun, 15 Oct 2006 15:03:17 +0000 (15:03 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 15 Oct 2006 15:03:17 +0000 (15:03 +0000)
  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

index 37def45a8698ed0de742a7be5ce6acf63057ba6f..7e19cae8af5328a57bea6522e09702964afdcf9d 100644 (file)
@@ -277,12 +277,6 @@ gtk_pizza_put (GtkPizza   *pizza,
     g_return_if_fail (GTK_IS_PIZZA (pizza));
     g_return_if_fail (widget != NULL);
 
     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;
     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))
     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_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
 }
 
 void
@@ -541,6 +536,7 @@ gtk_pizza_size_allocate (GtkWidget     *widget,
     widget->allocation = *allocation;
 
     border = pizza->container.border_width;
     widget->allocation = *allocation;
 
     border = pizza->container.border_width;
+    
     x = allocation->x + border;
     y = allocation->y + border;
     w = allocation->width - border*2;
     x = allocation->x + border;
     y = allocation->y + border;
     w = allocation->width - border*2;