The art of setting text to KStatusNotifierItem

Aurélien Gâteau aurelien.gateau at canonical.com
Wed Jun 2 13:13:50 BST 2010


On 02/06/2010 05:42, Andriy Rysin wrote:
> Got a little problem with this bug
> https://bugs.kde.org/show_bug.cgi?id=240225
> Looks like keyboard layout is the only systray item which needs to set the
> text (if show flag is unchecked) and currently the text is drawn as an icon,
> the text looks much cleaner than in 4.4 when it was to be overlayed and thus
> needed a halo to be visible. But there's a problem with darker themes as
> text is drawn with black and it becomes invisible.
> 
> Now there's no nice and quick way to fix it as I can see and there are
> several solutions I could anticipate:
> 
> 1. Allow setting text to KStatusNotifierItem (and let it deal with picking
> appropriate font size, color etc) - architecturally nice solution and very
> nice for the client app, but keyboard layout indicator being the only
> customer for this I don't see this implemented (unfortunately for me)

Actually we discussed the addition of a Label property to the
StatusNotifierItem protocol. I listed other potential use cases than the
keyboard layout switcher:
- A battery indicator could show the remaining percentage.
- A mail client or an RSS agregator could show the unread message count.

You can find the discussion here:

https://lists.launchpad.net/dbusmenu-list/msg00023.html

Aurélien




More information about the kde-core-devel mailing list