Re: Minimum height for minimum width
- From: Havoc Pennington <hp pobox com>
- To: Tristan Van Berkom <tristanvb openismus com>
- Cc: Owen Taylor <otaylor redhat com>, gtk-devel-list gnome org
- Subject: Re: Minimum height for minimum width
- Date: Tue, 12 Oct 2010 10:21:12 -0400
I guess to me it's much better to have one hack in GtkWindow globally
(GtkWindow is already a giant special case) than to leak the hack into
all widgets that actually do h-for-w. Just a separation of concerns
thing. It doesn't make sense for N child widgets inside a window to
all be trying to heuristically guess how to make the window have a
nice aspect ratio. Just do that on the toplevel. Even if the GtkWindow
hack is really nasty like a binary search, that's fine. (I think a
binary search might be overkill... picking a default size assuming
there's a roughly linear relation between min W x H-for-min-W and nat
W x H-for-nat-W probably works fine and is only 3 request cycles and
only to pick default size, not on every resize)
Then when implementing widgets, just return min size = min useful,
natural size = max useful, that is the raw data for GtkWindow, no
guesses.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]