Summary:
Changes triggered by investigation into a long-running high CPU usage bug with system tray animations. The systray itself had icon name to icon resolution code, which was being triggered (twice) for every icon, every time any icon in the systray was updated. This code was spinning up a KIconLoader on each of these instances, and throwing it directly away. Each one triggered a large quantity of memory allocations and disk scans.
This patch moves the extra bit of "appName" logic from the native part of the system tray to the statusnotifieritem datasource, which already had a stored 'customIconLoader' to handle icon theme paths, and removes the special lookup from the sytemtray applet completely. It also prefers icons provided by the dataengine to doing another lookup (contentious?). This removes all the extra CPU usage outside of the QML scene graph and graphics drivers locally.
This is very much a looking for feedback item - there are things about the icon loading paths I almost certainly haven't appreciated yet, and perhaps preferring loading by icon name in the applet has a another purpose.
BUG: 356479
Test Plan: Have tested locally with kgpg and steam, the two apps I have that trigger the old code path. In neither case, however, did the appName logic produce a different result to the code with just the icon search path in statusnotifieritem.
Reviewers: #plasma, davidedmundson, mart
Reviewed By: #plasma, davidedmundson, mart
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2986
when an applet is deleted, remove its fullrep from stackview before
the applet actaully goes away, as QQC1 StackView remains in an inconsistent
styate if one of its pages is deleted without having been fully removed
reviewed-by: kbroulik
BUG:373812
Scrolling over empty space or applet that doesn't handle
wheel events no longer activates desktop containment actions.
Differential Revision: https://phabricator.kde.org/D3572
Summary:
anchor the layouts of config dialogs to left
this way they will look the same normally (they
are positioned at x 0 normally) but will be
anchored to right instead if layout mirroring is enabled
CCBUG:372721
Test Plan: opened all config dialogs both in ltr and ltr layouts
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3456
Summary:
it's very rare that the icon list in the hidden area
of the systray is long enough to get a scrollbar, but
when it does it had a couple of issues:
sometimes it gets an horizontal scrollbar too and
the wheel events gets eaten:
always disable the horizontal scrollbar and
ignore wheel events over the label.
wheel events over the icon are still managed by
the applet (so still possible to for instance
adjusting the volume on pa applet)
BUG:372050
Test Plan:
hidden all the cions to enable scrollbar: wheel over
the text scrolls the view, over the icon adjusts the volume
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3263
When there is already a config for a given plasmoid, reuse it
instead of creating a brand new plasmoid (having config groups
endlessy accumulating in the config file)
https://phabricator.kde.org/D2817
BUG:365618
BUG:365569
be able to destroy applets even when locked: delete their config
by hand.
Except in one case: when the applet gets automatically destroyed
by dbus activation do *not* clear the config, it should be
reused next time.
BUG:365618
BUG:365569
Summary:
Plasma::PluginLoader::self()->listAppletInfo(QString() is expensive, it
loads and parses every .desktop file individually. Twice.
The main offender is the defaultApplets property, which gets requested
multiple times from JS space, and we reparse the files every time.
Moving the work to the constructor solves that. This saves loading (on
my machine) ~900 desktop files.
Test Plan:
- wiped config, defaults appeared
- DBus activated still worked
- restore works as before
Running "time plasmashell" shows:
BEFORE:
plasmashell 4.01s user 0.46s system 87% cpu 5.116 total
plasmashell 4.01s user 0.54s system 74% cpu 6.124 total
AFTER:
plasmashell 3.17s user 0.42s system 68% cpu 5.259 total
plasmashell 3.18s user 0.46s system 81% cpu 4.475 total
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2756
I slapped a console.time in there and it would show 1ms even on some
of the subsequent invocations, so while QML engine should do some
caching magic, calling it once is better anway.
Differential Revision: https://phabricator.kde.org/D2719
Summary:
Applet::destroy doesn't delete the applet from Containment::applets in
the same event. Potentially a dbus activated service being restarted can
be added in this time, causing us to try adding a new applet with the
same ID before the first object is deleted.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2703
Summary:
Applet::destroy doesn't delete the applet from Containment::applets in
the same event. Potentially a dbus activated service being restarted can
be added in this time, causing us to try adding a new applet with the
same ID before the first object is deleted.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2703
Summary:
on vertical panels the systray could get
stretched to a size taller than it should, getting
a lot of empty space
BUG:368146
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2645
internalSystray is (for some reason) only set in Component.onCompleted.
This fixes the warning this causes.
Differential Revision: https://phabricator.kde.org/D2608
If all system tray icons are visible the arrow would hide but the reserved
space for the system tray would not change leavnig a gap.
BUG: 365636
FIXED-IN: 5.7.4
Differential Revision: https://phabricator.kde.org/D2387
There was a conflict between adding a config option [1] in master and a
fix to crop to the icon size [2] in the 5.7 branch. I still need the
cropping on my vertical panel, otherwise the icons are insanely big.
[1] https://git.reviewboard.kde.org/r/128400/
[2] https://phabricator.kde.org/D2160
Reviewed-By-Over-IRC: Marco Martin <notmart@gmail.com>
BUG: 365394
This prevents the entire list item to zoom in and out when a NeedsAttention
item is forcefully hidden in the popup.
Differential Revision: https://phabricator.kde.org/D2099
This should fix the icons growing so large that there's hardly any padding around
them so they would overlap the indicator strip. It also makes the icon size more
consistent with other icons on the panel but there's still some differences depending
on the panel size and screen resolution.
Differential Revision: https://phabricator.kde.org/D2160
the option is not user exposed, so can only either be set manually
or by the default configuration script in the look and feel kcm
patch by John Salatas jsalatas@gmail.com
REVIEW:128400
So far, the width was only adjusted when opening the config but not when
actually assigning a shortcut, causing the shortcut button to flow outside bounds.
Reviewed-By: notmart
if no systray containment was found in config
immediately create the containment, so the
scripting shell can correctly find it
the javascript needs to be slighlty modified as:
var systray = panel.addWidget("org.kde.plasma.systemtray")
var id = systray.readConfig("SystrayContainmentId")
var systrayContainment = desktopById(id)
print(systrayContainment)
systrayContainment.currentConfigGroup = ["General"]
systrayContainment.writeConfig("extraItems","...
This ensures contents of the popup gets mirrored and the sidebar is moved to the
right and applets don't overlap it.
The expander arrow is not (yet) adjusted as this is much more complicated to solve.
Differential revision: https://phabricator.kde.org/D2048
Summary:
This matches the base CompactApplet in plasma-desktop.
This prevents the panel autohiding when a popup is still showing.
BUG: 364847
Test Plan:
Opened popup panel didn't autohide.
Autohid once popup closed
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2034
This matches what the other plasmoids are doing but we didn't get for free as we don't
use the ordinary applet popup logic in system tray.
Differential Revision: https://phabricator.kde.org/D1907
Summary:
Also set a consistent naming structure and to be only Info+ by default.
This may mean you need to update your logging rules if you want debug
output.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1956
Summary:
Width should not include top and bottom margins
BUG: 364543
FIXED-IN: 5.7
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1966
When you click an item it might show a menu of some sort which will grab the mouse
and the ToolTipArea never gets a leave event causing the tooltip to show up above
the menu.
Differential Revision: https://phabricator.kde.org/D1847