Review Request: Some improments to the system tray notifications.
Jason Stubbs
jasonbstubbs at gmail.com
Thu Nov 6 13:18:36 CET 2008
Rob Scheepmaker wrote:
> On Wednesday 05 November 2008 15:18:02 Jason Stubbs wrote:
>> Rob Scheepmaker wrote:
>>> * The icon us quite large and takes up a lot of space.
>>> Solution: remove the icon from the notification itself and use it as the
>>> icon of the extenderitem.
>> I guess you could call this a KIcon issue, but saving it to a config
>> file does not work all the time. As notifications are currently being
>> constructed from a QIcon (and thus has no associated name) notifications
>> will have an "unknown type" icon after plasma is restarted. This is an
>> issue with extenders themselves rather than this patch though.
>
> I have changed extenders so that the setIcon(QString) call will also save the
> icon to the config. But you're right that this doesn't seem to work in all
> cases. I'll investigate. (I currently don't have the source nearby, but I
> wonder why notifications are being constructed from a QIcon? The notification
> spec provides a name right?)
The system tray spec has a balloon message API that is essentially
another notification API. That API describes the icon by its bitmap so I
went for the highest common factor - a QIcon. For Qt, the API is
accessible with QSystemTrayIcon::showMessage(). I doubt that many (if
any) KDE apps are using it, but it should probably be supported fully...
>>> * The fixed size of the notifications make small messages take too much
>>> space, but also isn't enough to display larger messages. Solution: make
>>> the size hint depend on the size of the message. Make sure each
>>> notification is always displayed entirely.
>> After dragging a notification away, the resulting applet appears to have
>> a zero size. The extender item then seems to be drawing out of its
>> bounds. Not sure exactly what's going on.
>
> Yeah, that is an issue in extenders that is there for quite some time now, and
> of which I have got no idea on how to solve. The applet doesn't honor the
> sizehints of the layout it contains. Naughty layouts.....
Probably the layouts caching too heavily again.. If a child layout
updates its size hint, parent layouts don't seem to invalidate
correctly. I fought with it with the system tray for a while, but
eventually gave up. From what you describe, it sounds similar.
--
Jason Stubbs
More information about the Plasma-devel
mailing list