[Lazarus] GroupBox AutoSize issues
Henry Vermaak
henry.vermaak at gmail.com
Fri Mar 20 16:37:40 CET 2015
On Fri, Mar 20, 2015 at 04:23:44PM +0100, Mattias Gaertner wrote:
> On Fri, 20 Mar 2015 12:21:57 +0000
> Henry Vermaak <henry.vermaak at gmail.com> wrote:
> > 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.
>
> gtk_widget_set_size_request computes the gtk2 idea of the size of the widget including all child widgets. This includes widgets of the LCL child controls.
>
> TGtk2WSCustomGroupBox.GetPreferredSize should ignore the LCL child
> controls. It should return the size, as if there are no LCL child
> controls.
> The LCL computes the needed client area and adds the frame.
> The final preferred size is the maximum of these two sizes.
OK, I understand. Thanks for fixing the clip region stuff, it's looking
much better now!
Henry
More information about the Lazarus
mailing list