Deskbar panel mode
ndrwrdck at googlemail.com
Tue Nov 15 01:09:35 CET 2011
On 15/11/2011 00:14, Nick Schermer wrote:
>>> I have my doubt with the small property.
>> Yeah, I think I know why. I also was wary of adding it but I couldn't come
>> up with a better solution. Do you have any other idea of how to communicate
>> back to the itembar that the plug-in wants to be laid out in an array?
> I'd rather implement it on a plugin level, the item bar would affect
> too many existing plugin.
The flag is implemented at the plugin level (with a default set in the
plugin base class). But the actual layout is currently being done by the
itembar object. So far I was following only existing patterns - similar
plugin flags "expand", "shrink" already exist and are handled the same way.
>> The only other solution I can think of is detecting that the plug-in
>> requested a size that is smaller or equal to the row size. This way we could
>> remove the "small" property but IMHO it would introduce more complexity the
>> design (as the size would got another implicit meaning).
> Well I think that's not too bad. If we consistently say width (in
> vertical panel) is panel_size / nrows with pixel correction (50px is
> 17+17+16) it should be fine. That also means single buttons, like the
> directory menu, are height = panel_width / 3.
The exact size (with pixel correction) is unknown because the plugin
doesn't have any information on the exact location in the panel. Also,
this size would have to be updated every on the panel size (width)
change, which means (not sure about that) more events hit the itembar.
If we want to overload the plugin size, then I'd rather set the
requested size to a constant size like (0, 0) or (1, 1). But that's
starts looking hacky.
> I'll give it some more thoughts.
More information about the Xfce4-dev