Re: gtk geometry and child aspect ratio?
- From: Owen Taylor <otaylor redhat com>
- To: Johan Knol <johan knol iduna nl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk geometry and child aspect ratio?
- Date: Mon, 09 Feb 2004 07:34:24 -0500
On Sun, 2004-02-08 at 14:10, Johan Knol wrote:
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.
The geometry widget handling is unfortunately fairly broken currently.
http://bugzilla.gnome.org/show_bug.cgi?id=68668
has some details. To see how hacking around the limitations work in
practice, see the source-code to gnome-terminal. But I'm not
really sure how you expect it to work with the scrolled window
inbetween the toplevel and the geometry widget. The scrolled
window isolates the drawing area from toplevel resizing, so a
square drawing area shouldn't put any constraints on the toplevel.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]