forgot to CC the list: Begin forwarded message:
On 2012-02-10, at 10:38 PM, Murray Cumming <murrayc murrayc com> wrote:I would like my application window to be:
- At least as big as a certain minimum size.
- A little bigger if the screen is big enough for that.
- Not bigger than the screen.
- Not bigger than necessary.
I can control the size of my window by calling these functions on the
individual widgets:
gtk_widget_set_size_request ()
gtk_entry_set_width_chars()
but they only let me set a minimum size.
gtk_widget_set_natural_size() was a desirable API whichwe did not land by 3.0 but I think it would be a very welcomeaddition (havoc also suggested that one).I've also noticed that current 3.x behavior is tohave the windows's default size be derived from the natural size request automatically.I'm not sure if the default size also automaticallymaxes out at the screen size... but I think essentiallywe're just missing the API to manually force the naturalrequest of a given widget.Sry for quick short reply from hand held device...I can also call
gtk_window_set_default_size()
but I consider that hacky compared to setting child widget sizes, and
it has the same problem anyway.
Is there no way to specify both a minimum width and natural width (and
height) without deriving custom widgets, to override
GtkWidget::get_preferred_width() ?
I fear that I have to use
gtk_window_set_geometry_hints(), but that would need me to hard-code
window sizes:
http://developer.gnome.org/gdk3/stable/gdk3-Windows.html#GdkGeometry
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
|