The app name in the header has poor text contrast because it is 40%
transparent and sits on a gray background. It is also using a
semantically incorrect UI component (DescriptiveLabel) which was meant
for de-emphasized subtitles, not titles. The correct component for that
is a Heading, so let's use that.
Because this means that we will hve two identically-sized headings in
close proximity, we need to distinguish the text for the notification
title without making it huge, which is overkill for a notification. To
accomplish this, this MR uses the Heading's "Primary" type which was
made for this purpose.
In most cases the port is trivial and can even simplify the code like in
the case of the system tray applet. In the case of notifications applet,
this is causing a bigger refactor and it's now also using a TextArea
that provides the automatic scrolling when selecting behavior.
CCBUG: 437155
Works around the usual case of Breeze / Oxygen ensurePolish coming too late
causing a menu with an unwanted black outline, even more noticeable with Oxygen.
On wayland we need focus to copy to the clipboard.
As we don't want the notification to take focus indiscriminately,
it listens to mouse events of its children and only accepts focus
if it sees a button press. When the cursor leaves the popup again,
everything is reset.
BUG:434675
BUG:408507
These properties were not set correctly and produced a flood of console
spam instead of the desired effect. However the desired effect (header
that touched the edges of the popup) was already achieved anyway through
other means, so they are not needed at all. This commit removes the
offending properties.
This property applies to FrameSVGItem, but notifications were ported to
use PlasmoidHeading directly in dcc448f72f.
Let's remove the now-unused properly so it doesn't cause an error and
spam the log.
There's a custom PlasmoidHeading implementation in notifications now.
This patch ports it to use the generic component. If some changes get made to the component, they will now be reflected in notifications.
There's no API to set `linkColor` on `TextEdit` and it would use the
system link color potentially clashing with the Plasma theme.
BUG: 438366
FIXED-IN: 5.22.3
Allows us to run executables, e.g. downloaded installers.
Also moves some of the logic to the C++ side.
It also indicates "openwith" Kiosk restriction in the UI now by hiding
the button.
It's wrong to check the status of the plasmoid before closing it,
since the status is just the internal state of the plasmoid and
it's changed by actions from the plasmoid itself. So, the Passive
status doesn't indicate that the plasmoid is hidden in the system
tray, because the user can configure to always show this plasmoid.
The notification applet's config window is blank, and only shows the
auto-generated Shortcuts and About pages. This makes it not very useful,
as typically the user will want to get to the KCM instead. Other
applets with blank config windows (such as the Bluetooth and Networks
applets) make the configure button open the KCM instead and nobody has
complained about it, so let's do the same for the Notifications applet.
This has two advantages:
1. Greater consistency among applets
2. The "Clear all" action always appears visibly in the header without
getting pushed into a hamburger menu
3. A cleaner UI than the one merged in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/837
BUG: 433140
FIXED-IN: 5.22
This reverts commit 5893574163.
The approach taken in this commit was sub-optimal and not consistent
with what we do for other applets, so it needs to be re-thought.
The fact that the commonly-used "Clear History" action appears in a
hamburger menu has been a common user complaint about Plasma 5.21.
This happens because it's defined as an action, and the applet has two
actions ("clear history" and "open KCM") and when there is more than
one action, they all go into a hamburger menu. This makes the
commonly-used clear action more difficult to find that necessary.
A reasonable long-term solution would be to refactor the action
visibility code in plasma-framework to allow the display of more than
one action in the header without always putting them all in a hamburger
menu, or allowing the developer more control over this. However since
that would require frameworks changes, it can't be done in Plasma 5.22
because 5.22 requires Frameworks 5.82 which has already been tagged. So
let's do this simpler fix for now to fix the UX regression.
BUG: 433140
FIXED-IN: 5.22
There is no conceivable use case for turning this off, and the UI is
being removed in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/447.
So let's remove the backend code too, or else anyone who for some reason
had turned it off would be left without a GUI method of turning it back
on again.
We ported units to use the PlasmaCore.Units singleton earlier; now it's
time to do the same thing for PlasmaCore.Theme.
There are no UI changes or regressions detected.