Ayatana-like notifications for Plasma
Aurélien Gâteau
aurelien.gateau at canonical.com
Thu Sep 3 16:40:44 BST 2009
Aurélien Gâteau wrote:
> Sebastian Kügler wrote:
>
>> You don't need to remove the notifications from the systray by patching it, you can
>> just turn it off with the config option (which you're apparently also removing). This
>> only makes it harder to switch between those two.
>
> I am not removing the config option: in fact I recently added a new one
> to toggle Ayatana notifications on or off.
>
>> Looking at the code, I see that you're basically not using the (QGraphicsView)
>> canvas-based system Plasma uses.
>
> True. I reused some of the code I demonstrated at UDS. Since the
> PassiveNotificationWidget is a standalone widget which appears over the
> other windows, what would using QGraphicsView bring?
>
>> The Timeline stuff in there should probably use
>> Plasma::Animator, so the notify-osd stuff respect desktop-wide settings for
>> animations (you can switch them off in a central place, and have animations in
>> different UI elements synced with each other). Also, hardcoding animation duration
>> seems clunky -- again, no syncing of the animations with other animations, no way to
>> switch it off in a central place.
>
> Reading the API, it seems it requires QGraphicsItem, which probably
> answer my previous question.
More on the subject of using QGraphicsView and Plasma::Animator: I just
had a look at the tooltip code, since Ayatana notifications aim at
looking similar to tooltips, I think it make sense to get some
inspiration from the code.
I found out that Plasma::ToolTip inherits from QWidget, like I do and
use QTimeLine as well. Is it just because the code predates
Plasma::Animator or is it accepted architecture for new code?
Still I found some interesting code in ToolTip to check global animation
settings and use Plasma frame margins.
Aurelien
More information about the kubuntu-devel
mailing list