]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/win_gtk.c
added wxMemoryInputStream(wxInputStream&, size_t) ctor (modified patch 1680108)
[wxWidgets.git] / src / gtk / win_gtk.c
index 09bd29432c4c15404f33ae8c7fddd555fccb9d87..2b6944fb3e22a5fcf148deb77a782084bd865e42 100644 (file)
@@ -89,7 +89,7 @@ gtk_pizza_get_type ()
 
     if (!pizza_type)
     {
-        static const GTypeInfo pizza_info =
+        const GTypeInfo pizza_info =
         {
             sizeof (GtkPizzaClass),
             NULL,           /* base_init */
@@ -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);
 }