[Lazarus] GroupBox AutoSize issues
henry.vermaak at gmail.com
Fri Mar 20 13:21:57 CET 2015
On Fri, Mar 20, 2015 at 12:57:47PM +0100, Mattias Gaertner wrote:
> On Fri, 20 Mar 2015 11:31:07 +0000
> Henry Vermaak <henry.vermaak at gmail.com> wrote:
> > > The gtk2 interface only knows the current size of the child
> > > control(s). It does not know the preferred size of the child control(s).
> > So how do we fix this? If the groupbox code is changed so that it only
> > evaluates its own minimum size, will the autosize code do the rest, i.e.
> > loop over the children and take the maximum width/height?
> The LCL takes care of the child sizes.
OK, so then the use of GetGTKDefaultWidgetSize() in the groupbox is
wrong, since that's what is looping through all the child controls.
I've attached a patch that works for me, it's basically cribbed from
GetGTKDefaultWidgetSize(), so maybe that needs a NoChildren parameter so
that we don't duplicate the gtk2 size request code.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1504 bytes
Desc: not available
More information about the Lazarus