[Gtk2] autosize question

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Dec 11 20:59:27 CET 2009


On Thu, 10 Dec 2009 14:11:29 +0000
Henry Vermaak <henry.vermaak at gmail.com> wrote:

> 2009/12/9 Henry Vermaak <henry.vermaak at gmail.com>:
> > 2009/12/8 Henry Vermaak <henry.vermaak at gmail.com>:
> >> 2009/12/8 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> >>>
> >>> I don't know. Maybe you can create an example.
> >>
> >> I've attached a simple diff.
> >
> > No luck with this, but I got it to work if I set a flag in the
> > style-set and then check that flag in an event-after handler,
> > invalidating and sending a size message as necessary.  I just tested
> > this with buttons, but it should be possible for a generic case.  I'm
> > just not sure what the best way is to integrate this into the lcl.  Is
> > this something you're interested in for the lcl?
> 
> Any thoughts?

I added the event and some notes:

    This event is called for many widgets but not for all.
    It is called on creation and called when the theme changes.
    The resizing should occur when all styles were updated by the gtk.
    The gtk itself uses size messages via queue.
    Maybe the solution is to use g_idle_add for the top level form and resize.


Mattias




More information about the Gtk2 mailing list