D11233: Ordered system tray
Wojciech Stachurski
noreply at phabricator.kde.org
Sun Mar 11 14:45:21 UTC 2018
wsdfhjxc created this revision.
wsdfhjxc added a reviewer: Plasma: Workspaces.
wsdfhjxc added a project: Plasma: Workspaces.
Restricted Application edited projects, added Plasma; removed Plasma: Workspaces.
Restricted Application added a subscriber: plasma-devel.
wsdfhjxc requested review of this revision.
REVISION SUMMARY
Hello.
I've switched to Plasma quite recently and I'm really liking it, but the one thing that irritates me a little bit is the system tray not remembering its item positions. This results in a random icon placement, mostly for applications other than embedded plasmoids (e.g. KMail, Dropbox, Redshift and other StatusNotifier items), at every boot. I guess this behavior doesn't seem to be an issue for most users, as there is not much community pressure on this one, but only a couple of topics I've found on Reddit and maybe another single one on KDE Community Forums. Still, the system tray feels more comfortable to use if it can be consistent all the time and if its items can be placed the way one wants to, as it may have influence on workflow and desktop's visual aesthetics. Furthermore, even Microsoft Windows allows system tray item order configuration.
Having said that, I've done some research and managed to get the system tray positioning and configuration changed in a few places, so it remembers item positions and lets the user manually arrange the order of non-hidden items. In short, a new config list-type property is introduced to store all items with shown or auto visibility state and in user defined order. Items that are no longer loaded (and which are inactive at a time) are also remembered, so they can be positioned properly when they are loaded eventually. The elements tab in system tray settings contains positioning buttons for each non-hidden item in the list. The item list is refreshed every time a new plasmoid or StatusNotifier is registered or unregistered (well, maybe not every time, there is still some inconsistency). The overall result of the above changes is visible in the video attached below.
F5749559: Ordered system tray.mp4 <https://phabricator.kde.org/F5749559>
Now, I obviously do realize that this patch in its form is unacceptable to get into upstream, as its all hackish workaround to an existing system tray codebase. Honestly, my intention here is not really to contribute code of dubious quality, but to indicate the issue and provide some ideas and a working example to resolve it. I hope you will investigate this further at some point of Plasma development and maybe someone with appropriate knowledge and skills will consider implementing such a mechanism in a proper way, so the users could benefit from it.
Thanks in advance!
(BTW, both Kubuntu 17.10 with backports and KDE Neon Developer Edition seem to suffer from plasmashell crash after closing the system tray configuration window with elements tab beign open and clicking on any plasmoid in system tray afterwards. This is probably caused by bug 383828)
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D11233
AFFECTED FILES
applets/systemtray/package/contents/config/main.xml
applets/systemtray/package/contents/ui/ConfigEntries.qml
applets/systemtray/package/contents/ui/items/AbstractItem.qml
applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
applets/systemtray/package/contents/ui/main.qml
applets/systemtray/systemtray.cpp
applets/systemtray/systemtray.h
To: wsdfhjxc, #plasma_workspaces
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180311/4489e121/attachment.html>
More information about the Plasma-devel
mailing list