gtk geometry and child aspect ratio?



Hi, this may be a newbe question, but it drives me crazy ;(

A very simple app (using glade):

- window1
-- vbox1
--- scrolledwindow1
---- drawingarea1
--- statusbar1

Now I want drawingarea1 to be squared, so:

void
on_drawingarea1_realize (GtkWidget *widget, gpointer user_data)
{
  GdkGeometry geometry;

  geometry.min_aspect = geometry.max_aspect = 1.0;
gtk_window_set_geometry_hints (window1, widget, &geometry, GDK_HINT_ASPECT);
}

But this squares *window1*, not the *drawingarea1*, which was passed on as the geometry_widget ;(.
Any help would be greatly apreciated.

TIA,
Johan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]