question about GDK_HINT_ASPECT



I saw this question asked elsewhere but couldn't find an answer for it.

I've got a window that contains:

window
 +----vbox
       +----menubar
       +----toolbar
       +----frame
             +----drawing_area

The frame is packed to expand and fill, the menubar and toolbar are not.

During window creation, I,

        gtk_widget_set_size_request(drawing_area, width, width*ysize/xsize);

        geometry.min_aspect = geometry.max_aspect = (gdouble) xsize/ysize;
gtk_window_set_geometry_hints(GTK_WINDOW(window), drawing_area, &geometry, GDK_HINT_ASPECT);
        gtk_widget_show(window);

However, the window appears at the desired aspect ratio, not my geometry widget, the drawing area. And resizing the window constrains the window to the desired aspect ratio, not the drawing area. Am I leaving something out?

Commenting out gtk_window_set_geometry_hints() shows my drawing area at the correct aspect ratio but obviously doesn't constrain the window.

-Chinh Nguyen
 cnguyen stata com




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