Set the minimum-extent property from the size_allocate handler of the sheet
[pspp-builds.git] / lib / gtksheet / gtksheet.c
index 8b25902c3b1cc2421c2e5e101b9dbeb77bc7aff8..d8517ae30a4eb70745b68683c5553c64eb30fa8e 100644 (file)
@@ -4432,6 +4432,23 @@ gtk_sheet_size_allocate (GtkWidget *widget,
                            sheet->row_title_area.height);
 
 
+
+
+
+
+  if (sheet->haxis)
+    {
+      gint width = sheet->column_title_area.width;
+
+      if ( sheet->row_titles_visible)
+       width -= sheet->row_title_area.width;
+
+      g_object_set (sheet->haxis,
+                   "minimum-extent", width,
+                   NULL);
+    }
+
+
   /* set the scrollbars adjustments */
   adjust_scrollbars (sheet);
 }