Re: Size allocation and redrawing issues



Owen Taylor <otaylor redhat com> writes: 
> For a status-bar style continually changing display, I think the right
> behavior is simply to truncate the label at the allocation and make
> the toplevel resizable - if the user wants to see more, they can make
> the window bigger. Having changing text bump the window bigger 
> is not really a good idea.

This is what GtkStatusbar currently does, as well. (Truncates the
label.)

Several times I've written code that sets up a widget two different
ways, size requests each one, then uses the max of the requests to
compute the default window size. I think that's basically correct for
many cases. In 2.2, we might add some sort of convenience
functionality for this, though I'm not sure what the API would look
like.

Note that windows already have never-shrink behavior when they are
user-resizable, in that if you bump up the size request so that the
window is forced to expand, it will not shrink again if the size
request goes back down.

Havoc




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