Panel applet size allocation

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

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

TH *

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