There's no need to reconstruct the entire menu, when it exists already.
Also shows correct behavior on Wayland because the imported menues have
correct parents compared to the new one.
BUG:438467
When the mouse hovers the appmenu item, the text color should be inverted to the background
color. Before this commit, the text was still the same color as the "REST" state, making it
difficult to recognize.
Instead just set the right focus properties so that we are actually
declaring what we want instead of bypassing all the focus mechanisms.
This also uses Plasmoid.expanded to ensure we reevalute the focus
binding when the applet is reshown so it is in a known state.
We use a checkmark icon for the notifications applet since having no
unread notifications is considered a good thing. In this busy modern
world, having no scheduled events on a particular day can be considered
in the same way, so let's use a checkmark icon here too.
Often, it's hard to gague a numeric 'how much is that' from larger
file transfer jobs, e.g. '150 MB of 7 GB' isn't trivial to guess
a rough percent from. Adding an explicit percentage makes these cases
far easier to gague numerically.
Now that we depend on a new enough version of PlaceholderMessage, we can
use its explanation: property to display a subtitle, rather than a child
Label item.
The code is borrowed from the wallpaper: use a StackView to handle
multiple Image instances, and cross-fade between them when the
artwork changes.
BUG: 446862
FIXED-IN: 5.25
Power profile labels are gone and replaced with only two descriptive
icons, and now there's only one of label at the top of the slider,
which aligns with what `BrightnessItem`s do.
Padding of the header is handled now entirely within the header itself.
Slider refuses to set a value beyond its end, make sure "to" is up-to-date
before we attempt to set "value".
Position changed may be emitted before Length change was emitted.
Fixes media controller position not being up to date on first open.
The item's implicit size is supposed to be the size of its contents.
Fixes a regression from ScrollView port and restores line count
limit behavior (8 lines on popups, no limit in history).
When creating a new KService, it will try to read the file as a desktop
file, but if the file is a large non-desktop file, it will hang for a
long time.
Verify the file is a desktop file, and if not, skip creating KService
and run the match directly.
BUG: 442970
FIXED-IN: 5.24.4
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.
Instead of relying on the thumbnail strip size, which can temporarily
change during (re)layouting and/or be incorrect when we initially fetch
the thumbnail.
The potential change in image fidelity in notification history is
imho justifiable over the improved speed and reliability of thumbnail
generation when we don't needlessly create a pixmap we don't use.
BUG: 401579
FIXED-IN: 5.25
Best used in conjunction with with
https://invent.kde.org/frameworks/kio/-/merge_requests/780 which will
allow kicker recentUsageModel not to make any stat call but solely
base its iconName based on passed mimetype, allowing to act as if
KFileItem::SkipMimeTypeFromContent was set.
Especially for longer downloads where a user is more likely to minimize
the job popup, it is useful to be able to see basic job information
(title, i.e. "Downloads", percentage) without having to open the
notification history.
Moreover, it can be hard to judge completion percentage from the tiny circle.
Rather than relying on `Plasmoid` from deep down in `NotificationItem` code,
which is not possible when run inside the popup.
In `Globals` we have access to our own `plasmoid` property directly.
`Globals` (popup handling) is a singleton and as such has no access
to context properties like `plasmoid`. To remain "API-compatible"
there is a `plasmoid` property in `Globals.qml`.
However, this broke with the port to a singleton type and is
admittedly bad layering.
Move drag handling into a proper singleton type to avoid
cross-referencing `plasmoid` from ten layers deep down the code.