On Tue, Nov 20, 2007 at 08:11:48PM +0100, Sebastian Geerken wrote:
Hi,
On Sun, Nov 18, Johannes Hofmann wrote:
actually I would propose to use a PackedGroup and let fltk do all the resizing/repositioning. I have attached a patch to dillo2 and dw2 that does this. It's a bit radical, so I think it needs some discussion before it can be applied :-)
As an answer to this and an other mail (Johannes?): hiding scrollbars is actually intended, if they are not used. That is, e.g. a vertical scrollbar should be invisible, when the text is short enough, and this saved space should be used for the text. If the latter is not the case, this is actually a bug.
Yes, the hiding of the scrollbar when it is not needed is a feature. A very useful one :-) However I think view and layout should not care about scrollbars. Attached is a patch (a proof of concept only) that * moves scrollbar creation to ui.cc * uses a PackedGroup for TopGroup and lets this PackedGroup do the layout of Panel, Main, StatusBar _and_ the scrollbars. * a reference to the scrollbars is passed to FltkViewport so that it can adjust their sizes and hide()/show() them as needed. That way view and layout only need to be able to deal with size changes whether they are caused by the user that modifies the window size, or by TopGroup that rearranges things, because a scrollbar becomes visible or gets hidden. This would make all the scrollbar handling in layout unneccessary. But as I do not completely understand the current code for scrollbars in layout, I am probabely missing something... Johannes PS: As a side effect standard fltk replace() can be used again in UI::set_render_layout().