Panel plugins HIG

Harald Judt h.judt at
Mon May 28 13:48:25 CEST 2012


For some time now, some people including me have been trying to update 
and cleanup the panel plugins, especially those that have meters 
implementing by gtk progress bars. The problem is not only spaghetti 
code but also UI decisions which have been made differently and 
arbitrarily for each plugin, or in some cases not at all. A lot of code 
has been copy-pasted from and to various places, and often not a lot of 
the original intentions of those pieces of code have been preserved.

Unfortunately, the HIG on do 
not explain what to do in enough detail, or maybe contain already 
outdated information.

Here are the main problems regarding monitor plugins, but some of these 
issues concern other plugins too:

1) Plugin container size is inconsistent.
    Ideally, the plugins would adapt their borders to different panel
    sizes. Especially on small panels they often look squeezed and ugly.
    A lot of space is wasted. There should be a proper tradeoff between
    good looks and efficient use of space.

2) Box child spacing is inconsistent.
    Some plugins have their labels stuck to the progress bars on one
    side because there is no spacing defined.

3) Progress bar size is consistent in the panel standard configuration,
    but all plugins calculate the size differently, so that it will
    change when resizing the panel in some plugins, but not in others.

And now here are some proposals for those problems:

1) Plugin container size should be set uniformly for all plugins, and
    according to the panel size trying to keep sane values for good
    looks vs usage of available space.

    For example: No border for panel sizes 16-20, border=1 for
    panel sizes 21-26 and border=2 for anything bigger.

    IMO, setting no border for medium sized panels (21-26) or even
    bigger panels looks ugly (also try transparent panels here and you
    notice this more easily, it looks like windows without decoration).

    Ideally, the panel itself would take care about that calculation
    and offer a function to call to get the optimal border. That way,
    no code would need to be copied and pasted around.

2) A default of 2 would seem fine here. Whether we choose 1 or 2 is not
    so important, but choosing a consistent value definitely is.

3) I did not think about this a lot, but the standard of 8 pixels that
    are mostly used now are ok for me. In my opinion, they wouldn't even
    have to scale with the panel, especially not in deskbar mode.

Please feel free to add any other troublesome things about plugins I 
might have forgotten here and that you think are worth discussing.

Looking forward to hear your opinions, proposals, recommendations,...


`Experience is the best teacher.'

More information about the Xfce4-dev mailing list