The QStringView::to<Number>() methods in Qt5 cause one extra allocation
compared to the QStringRef counter-part. As long as we aren't on a hot
path this is probably not worth the extra #ifdef though.
Discover current minimum height of applet labels in hidden
view and apply it for all of them when they are shown
inside hidden applets view. This implementation provides
always only the maximum needed label height based on label
contents.
BUG: 438347
FIXED-IN: 5.24.3
The prefered is to show context menu on mouse pressed event, not click,
but this causes few issues for SNI.
Some legacy applications still relies on XEmbed to show tray icon.
We use xembedsniproxy to relay the mouse press signals to the XEmbed client
but some applications (including GTK) validate the mouse state.
Mouse released state is expected, but as it is still pressed context
menu does not show.
BUG: 409768
FIXED-IN: 5.24.3
With the keyboard navigation patch there is the issue that sometimes,
due to sorting by SortFilterModel, the stack order of the items doesn't
correspond to the visual order of the items.
This is a problem wrt the recently introduced keyboard navigation, as
the tab order of items in qml is completely tied to the stack order,
resulting in an erratic tab navigation order (usually happens with
device notifier or bluetooth applets for instance)
StatusNotifierItem.qml does not explicitly handle the case of
right-clicking, which causes right-clicks to be ignored unless you also
happen to have the libappindicator package installed, which injects a
handler for this itself. But this should work even if you don't have
that package installed; this commit fixes it.
BUG: 449870
FIXED-IN: 5.24.1
All the sizing and positioning code in this SvgItem relies on assumption
that plasmoid's location would we strictly either one of four edge
types. So this patch ensures that this thin separator line is only
visible when this assumption is true. Otherwise its both width and
height get reset (by binding `undefined`), and SVG starts filling up
the whole available area, which leads to a visual glitch that looks
like a as grayed out or faded applet.
See also: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/576
BUG: 449535
The MouseArea in AbstractItem needs to be above applets
when it's in the grid hidden area so that it can receive
hover events while the mouse is over an applet
But when the applet is shown as an icon on the regular
systray it needs to be below so the PlasmoidItem `onClick`
takes precedence and systray collapsing works.
BUG: 449533
FIXED-IN: 5.24
Allow the Panel to get active keyboard focus via a kwyboard shortcut which will cycle between all panels.
When a panel has focus, the active focus can be navigated around either with tab/backtab or arrow keys.
Simple popup applets which only display an icon will work automatically,
Complex applets like the System tray or the taskbar will have focus that can navigate on all their sub-elements, to activate a particular systray applet or activate a particular window
Co-authored with Benjamin Port<benjamin.port@enioka.com>
CCBUG: 352476
Applets in PlasmoidItem were blocking events from reaching the
ToolTipArea, so I moved the on hover logic to the AbstractItem's
MouseArea and put the MouseArea over the iconContainer. The
iconContainer is the parent of applets. Presses tend to hit the center,
which is where the applet is, preventing ToolTipArea::containsMouse from
being true and preventing the highlight from moving to the pressed item.
Hopefully this doesn't cause duplicate actions when events reach the
applet. I tested the patch on the nightcolor applet and all the other
default applets and didn't see anything wrong. I think this may be
because the signals are sending QML MouseEvents to the applets, causing
them to be accepted if the applet can accept them. Then when the signal
handlers are done, since the events are already accepted, they should
not move beyond the MouseArea and cause another round of event handling.
Over the years we've changed icon spacing many times. And every time we
do, we get bug reports about it from people who were happier with the
previous value. Typically we close these bug reports as RESOLVED
INTENTIONAL, but it always leaves a sour taste in the mouth. People's
preferences for spacings and paddings are legitimate.
In addition, a larger spacing can be quite useful in Tablet Mode, to
increase the size of the touch targets to be closer to the size of the
user's finger.
This commit adds a simple UI to switch the spacings of the visible items
between three values, with the middle one that matches the current
spacing being the default. While Tablet Mode is activated, the spacing is
automatically set to its highest value and made non-user-adjustable,
just like we already do this for the icon size setting.
An input type agnostic way to activate systray items was needed. This
signal will be used for keyboard, mouse and touch navigation.
There was an activated() function that just started an animation which
has been renamed to startActivatedAnimation().
PlasmoidPopupsContainer.qml has special code to handle merging headers
from applets if those applets use a PlasmaComponents3.Page instance as
their FullRepresentation. However this breaks for any applets that use
PlasmaExtras.Representation, which is a subclass of it that we have been
porting applets to over time, because it offers more features in a
single location. This caused the detection to break, so such applets
woudl have their headers improperly merged.
Explicitly detecting the use of PlasmaExtras.Representation as well
fixes it.
BUG: 438178
FIXED-IN: 5.24
Normally we don't use Kirigami in applets, so this might on its face
seem odd, but it's there for a reason, so add a comment explaining why.
GIT_SILENT
The system tray doesn't follow the panel opacity (it's always
transparent even when the setting is set to opaque or dynamic
with a maximised window present)
BUG: 439025
FIXED-IN: 5.23.5