Re: Panel applet size allocation



The 2 missing pixels should be padding determined by the active gtk
theme if I'm not mistaken.

-Stefan Nuxoll <stefan nuxoll eu org>

On Dec 29, 2009, at 8:15, Tony Houghton <h realh co uk> wrote:

>
> I'm trying to write a panel applet in python which scales itself to
> fit
> the size of the panel (the height for horizontal panels and the width
> for vertical ones). But I can't find a way to find the true size of
> the
> panel.
>
> As the documentation says, the size hint returned by
> panel_applet_get_size() and "change-size" is not useful (because it's
> not the true size of the panel, but rounded to some arbitrary
> constants). But the docs also say "size negotiation ... is handled by
> size_request() and size_allocate() as usual." But it doesn't work that
> way! "size-allocate" signals only get sent when the size hint changes,
> and they come in pairs: one with each dimension 2 pixels less than the
> size request and then with the dimensions the same as the size
> request,
> no matter how different that may be fromthe true size of the panel.
> I've set the EXPAND_MINOR flag but it makes no difference.
>
> It must be possible because the Workspace Switcher does it, but the
> wnck
> Pager code is a bit too complicated to follow as an example; it
> looks as
> if it replaces a size_allocate function in its GObject implementation
> rather than using signals, maybe to repair or work around
> PanelApplet's
> vandalism?
>
> --
> TH * http://www.realh.co.uk
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list


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