The code looks into the appletsrc file to load the wallpaper for a given
activity.
However that only worked when a custom image was specified by full path.
When any of the built-in wallpapers is used the Image key instead points
to the wallpaper package folder, not any specific image.
Also when the default wallpaper is used the key is empty.
Fix all of these cases by selecting one image when given a folder, and
fall back to the default wallpaper (called Next) when no config is present.
Also when using a color background use the actual default color instead of black
BUG: 378693
Another pass of relatively simple linting changes, including
- avoiding ids and properties with the same name
- avoiding var in favor of const/let
- a few unused imports, unqualified accesses to members of parents, etc.
that have crept in.
We set the RunnerResultsList currentIndex to 0 or -1 if appropriate as
search results come in. This works, but we need to track the overall
runnerModel here (which we otherwise don't need), and call this check
more often than needed (we keep rechecking everything on each column
coming in).
Instead, we can just listen to the property that tracks whether we are
the first column: we should only set it to 0 if it is currently the
first column, and only need to unset if we were the first column before
(as otherwise nothing would set us to 0 in the first place). We also need
to do it in case the current model changes, as that might reset the
currentIndex. This is marginally less work (linear instead of quadratic,
but with small n), and simpler as we don't need an extra Connections
to the outside to track it.
Kicker writes its config's favoriteApps value to
globalFavorites.favorites if it is changed, and writes the new value to
the config on globalFavorites.favoritesChanged. This does nothing:
globalFavorites is a KAStatsFavoritesModel and only has a favorites
property for backward compatibility reasons; reading or writing it does
nothing except print a warning that this is unsupported, and
favoritesChanged is never emitted in this model, The only time that this
code every does anything is if the user somehow manages to change the
config value (and nothing changes it, so maybe with a Plasma script?).
And the only thing it does then is print a warning, so still not useful.
Lets' just remove it. (systemFavorites is a SimpleFavoritesModel, and
the property actually does something here).
WindowSystem by now was only necessary for X11 when passing focus to
submenus. We don't do X11 anymore in Plasma, so we can remove it.
In the future, we might also want to remove the type from the backend,
but that would break third-party forks of Kicker that still use it, so
needs a bit more consideration.
ItemListDialog forwards the source model's sorted property if set. This
was necessary when we filtered separators on sorted menus in the
frontend, but we now do it in the backend for better results since
d4ea56419a. The sorted property has no
more function now. Let's kill it.
Kicker has the key handler on AbstractItemDelegate, but there's also
a stray one on SideBarItem. This causes le favorite to launch twice when
pressing Space (but not when pressing Return).
Instead, delete the unnecessary extra handler.
Arrow Down from the search field goes to the main gridView, but Arrow
Up from there doesn't go back. Our previous implementation using
KeyNavigation broke during refactoring, and was half-replaced.
Instead, fix the KeyNavigation, and make the handover pattern a bit
more obvious with a comment (similar to how we have them in a couple
of other places)
We delay showing the audio indicator by 2000 ms, so that it won't flash
in and out if the app only plays a very short stream and goes silent
again. We don't do this for stopping playing streams though. Generally
reasonably as apps rarely stop their stream only for short periods, and
having it update immediately is nice. But "rarely" is not never, and
there is one particular case that's common to trigger: video players
usually pause on click, and go fullscreen on double-click. This is
registered as stopping the stream, then reopening the old one, so causes
fade out - delay - fade in. It can even abort in the middle of fading
out, leaving a partially faded audio indicator in the panel for
2 seconds if you un-fullscreen a playing video until it's fully opaque
again. This looks a little broken.
Instead, we add a small delay on hiding the icon as well. We can just
take the double click delay (defaulting to 400 ms), as this exactly
covers the situation where this will most commonly occur, and should
also handle other brief interruptions of the stream pretty well.
BUG: 522471
FIXED-IN: 6.8.0
Reusing delegates does not work if the model is replaced; the reused
delegate keeps its old model binding. For KickoffListView, reuse was
turned off with aa8a1fbf4b (2024), but
in KickoffGridView, reusing items remained on. The same thing can
happen there though (but it needs a very long list of apps, at least
on the order of two full pages) - when switching between categories,
any delegates that were pooled from being scrolled far outside the
view are reused on category switch, but with their old contents from
the previous category now appearing in the new category.
Instead, disable reuse of items in GridView as well - it's only rarely
relevant anyway as you need so many entries in a category, and the only
time it's relevant it breaks category switching.
BUG: 515229
FIXED-In: 6.6.7
When the user starts dragging an item, it's no longer considered hovered
(I suspect the DragHandler takes over the grab), which causes the
ItemListView to unset the currentIndex, which causes the highlight to
vanish. But the delegate still considers itself pressed, and uses the
highlighted text color, so we end up with dark text on dark bg (or light
on both).
Instead, don't unset the currentItem if we are dragging. Alternatively
we could make it no longer pressed, but it's probably better to keep the
highlight so users get better visual feedback about which item they're
dragging (instead of just the icon).
You can't drop categories anywhere, and they have no url to do anything
with. But Kicker still allows you to start a drag.
Instead just disable dragging on everything with no url and no
favoriteId. (We still need to allow empty urls with favoriteId, as
system actions don't have an url).
For a while, we used "qmllint disable unqualified" on lines containing
i18n calls to get the linter to shut up about them. The better way to do
this (since Qt 6.11) is to register them with qmllint as context
properties, which we now do centrally for the whole project.
So remove them all. This reduces noise in the codebase, and will still
show other unqualified lookups on the same line, making it possible for
qmllint to find them.
TaskProgressOverlay sets LayoutMirroring on the contentItem, but turns
off childrenInherit. This means that the FrameSvgItem does not use this
LayoutDirection, and the progress bar fills left-to-right as the anchors
are not flipped.
We could set childrenInherit, but it seems that setting the direction on
the Item is unnecessary, we just need it on the FrameSvgItem (which has
no children anyway, so the setting does not matter)
BUG: 524112
FIXED-IN: 6.7.5
### Reason for the change
Installing it as FILES doesn't assign it execute permissions. This
makes kglobalaccel deny launching it.
### Test plan
Press Meta+Alt+S
### Screenshots or screen recordings
With the change, this doesn't happen anymore:
{width=500}
---
cc @nicolasfella
Task manager has the option to show the tooltip on click fro grouped
tasks (somewhat misleadingly labeled "Show small window previews",
which it does only if window previews are enabled; it shows the tooltips
as they are). At present, this setting is not particularly useful, as
it just skips the tooltip delay; even though the user has indicated that
they want to interact with that particular grouped task, accidentally
hovering over another window's grouped task will immediately replace it
with that task.
We already have some machinery to track the clicked state, but it broke
over time, mainly for two reasons: we always replace the tooltip
explicitly and reset clicked state, when the grouped task stops being
hovered, so when the machinery could come into effect it's already been
unset. Then, the tooltip is implemented with a tooltip area, and that
will always hide on its own when no longer hovered, and it will also
automatically change the visualParent when something starts being
hovered (so if the first two were fixed, we'd get the clicked task's
tooltip on the hovered task, not itself).
To fix this, we (a) stop resetting and updating on hover state change if
there's a clicked grouped task (b) re-show the original tooltip if
another task is hovered (to circumvent the automatic closing) and (c)
turn off the other tasks' ToolTipAreas while there is a clicked grouped
task, to stop the re-visualParenting.
BUG: 484206
FIXED-IN: 6.8.0