Re: Minimum height for minimum width



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]