Review Request: Implementation of System tray in QML

Dmitry Ashkadov dmitry.ashkadov at rosalab.ru
Mon Oct 22 12:00:17 UTC 2012



> On Oct. 21, 2012, 12:14 a.m., Kai Uwe Broulik wrote:
> > plasma/generic/applets/systemtray/package/contents/ui/IconsGrid.qml, line 29
> > <http://git.reviewboard.kde.org/r/106965/diff/1/?file=91322#file91322line29>
> >
> >     Can you make the size honour the global KDE icon size settings? This would fix a long standing wish Bug 133936, and more importantly: This will make the systray work on high-dpi monitors.
> >     We have SVG tray icons, so why not take advantage of this? Only drawback are XEmbed tray icons which cannot be scaled(?) since they are not actual icons, but I think they should be shown centered inside the bigger cell then. (and the only app I regularly use that still uses XEmbed is Skype)
> 
> Dmitry Ashkadov wrote:
>     I can try do this, But how can user set size of icons? There is no such option now. I need to know how can I get size from KDE settings.
> 
> Kai Uwe Broulik wrote:
>     Have a look at:
>     http://www.purinchu.net/kdelibs-apidocs/kdeui/html/classKIconLoader.html
>     
>     IconSize(KIconLoader::Toolbar) should return a matching size as int.
>     There is a KIconLoader::Panel but it is 32 by default and on my machine 48, whereas the Toolbar defaults to 22 which should match the current systray icons.
>     Probably do a: if (IconSize… > 22) { use iconsize; } else { use default 24; }
> 
> Marco Martin wrote:
>     systray icons (as in xembed ones) can only be 24 pixels (in theory the spec says they should be resizable, in practice none are)
>     nearest kiconloader size is 22 (SmallMedium) so is not really possible to not hardcode in this case
>     
>     they should be 24 or less (only statusnotifiers will be correctly resized in this case)
>     in case of statusnotifiers the icons to be drawn 22 pixels (theme.smallMediumIconSize in qml) inside a 24x24 item
>     
>

It would be better if Plasma::IconWidget has elementId property. I think, we should consider addition of property elementId to Plasma::IconWidget. This can simplify code of SystemTray. I don't want to write too much imperative code because it makes QML like C++. The advantage of QML is its declarative style.


- Dmitry


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106965/#review20608
-----------------------------------------------------------


On Oct. 22, 2012, 9:19 a.m., Dmitry Ashkadov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106965/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2012, 9:19 a.m.)
> 
> 
> Review request for Plasma, Aaron J. Seigo and Marco Martin.
> 
> 
> Description
> -------
> 
> Implementation of GUI part of System tray in QML. All code accessible from specified branch of kde-workspace 
> 
> 
> Diffs
> -----
> 
>   plasma/generic/applets/systemtray/CMakeLists.txt d3ce33b 
>   plasma/generic/applets/systemtray/TODO 257fbe4 
>   plasma/generic/applets/systemtray/config.h.in aac3113 
>   plasma/generic/applets/systemtray/core/task.h 31d5949 
>   plasma/generic/applets/systemtray/core/task.cpp 55c9a1a 
>   plasma/generic/applets/systemtray/package/contents/ui/ArrowArea.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/IconsGrid.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/IconsList.js PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/IconsList.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/StatusNotifierItem.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/TasksSet.js PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/TrayIcon.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/main.js PRE-CREATION 
>   plasma/generic/applets/systemtray/package/contents/ui/main.qml PRE-CREATION 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtrayprotocol.h aa6050e 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp f4e8424 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.h 2847b25 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp d4cb309 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraywidget.h 0c6daf0 
>   plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraywidget.cpp 33cf0b1 
>   plasma/generic/applets/systemtray/protocols/fdo/fdotask.h 4cb5368 
>   plasma/generic/applets/systemtray/protocols/fdo/fdotask.cpp 69cd625 
>   plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.h 3e8d120 
>   plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.cpp 8c1ebba 
>   plasma/generic/applets/systemtray/ui/applet.h d6cc509 
>   plasma/generic/applets/systemtray/ui/applet.cpp f3c6d9a 
>   plasma/generic/applets/systemtray/ui/compactlayout.h c330cee 
>   plasma/generic/applets/systemtray/ui/compactlayout.cpp e8d02ff 
>   plasma/generic/applets/systemtray/ui/dialog.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/dialog.cpp PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/mouseredirectarea.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/mouseredirectarea.cpp PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/plasmoid.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/plasmoid.cpp PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/taskarea.h 0e73ead 
>   plasma/generic/applets/systemtray/ui/taskarea.cpp 4c2d120 
>   plasma/generic/applets/systemtray/ui/taskarea_p.h fc93661 
>   plasma/generic/applets/systemtray/ui/taskspool.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/taskspool.cpp PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/uitask.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/uitask.cpp PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/widgetitem.h PRE-CREATION 
>   plasma/generic/applets/systemtray/ui/widgetitem.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/106965/diff/
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> Example
>   http://git.reviewboard.kde.org/r/106965/s/788/
> 
> 
> Thanks,
> 
> Dmitry Ashkadov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121022/5218f487/attachment.html>


More information about the Plasma-devel mailing list