Re: set_resize



Il giorno mer, 14/01/2009 alle 17.20 +0200, Kalle Vahlman ha scritto:
> 2009/1/14 Pietro Battiston <toobaz email it>:
> > I would have filed a bug (asking for windows to clip to screen when
> > their their size_request is too big*), but it's obviously a major issue,
> > so obviously it can't be true that nobody thought about it.
> 
> Clipping a window is dangerous, since it can obscure controls so that
> you can't reach them at all any more. If the window expands to
> infinity, you can at least move it partially offscreen to reach the
> other end.

I thought "the user will just resize it (dragging it out of the screen
above/at right) and then do what you want", but I realize now that if
resize is forbidden to the user it is indeed a problem.


> Forcibly clipping window size would anyway only be band-aid to the
> real problem in the application, which can be:
>  - it doesn't adapt the size of a window for small screens (a minor,
> but unfortunately common issue which can be worked around by moving
> the window partially offscreen)
>  - it doesn't constrain the size of a dynamically resizing widget

I don't see how this is a problem; instead, it is where my question came
from: I had a ScrolledWindow which I wanted to be as big as possible,
but not as big as its child if that meant overflowing screen.

>  - it doesn't offer scrolling for a dynamically resizing widget
> 
> So while it indeed would be possible, it would be just correcting
> design problems of an application in a potentially harmful way.
> 
> Although unscalable UI:s are not something I would want to see
> supported in any way (I would rather see them fixed than worked
> around), one feasible way of not expanding beyond screen size would be
> to automatically make gtkwindow to reparent it's child to a
> scrolledwindow (or just implementing scrolling itself) if the
> size_request would make it bigger than the screen.
> 
> One point to notice also is that knowing the size of window
> decorations is a window manager dependant feature so it can't really
> be trusted to be always available.

Well, OK, this is a strong point, I tried my horrible hacks only with
metacity and didn't know they where not portable.

If, as I imagine, a window manager has no way to say "no, app, I won't
give you all the space you requested but only the available size", then
the answer to my doubt is complete...

thank you for the clarification

Pietro



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