Commit graph

381 commits

Author SHA1 Message Date
Niccolò Venerandi
cab933b069 applets/pager: don't Show Desktop when scrolling pager
Scrolling past the first or last desktop asked the pager model to switch to the
current desktop, which toggles Show Desktop when that option is set for clicks.
Only change the page from the wheel handler when it is a different one.

BUG: 471241
2026-11-02 19:03:00 +01:00
Christoph Wolk
59afb4eaff applets/pager: rename StackingOrder role
Pager's WindowModel adds a StackingOrder role (with rolename
StackingOrder), but the source model already has this role with
the same rolename. When we try to get the new property from qml for
a delegate, we get many warnings of the type:

qt.qml.propertyCache.append: Final member StackingOrder is overridden in
class QQmlDMAbstractItemModelData. The override won't be used.

The two properties (AbstractTaskModel's StackingOrder and pager's
StackingOrder) usually give the same result, so there doesn't seem to
break anything badly, but we can get rid of the warnings (and get the
value as originally inteded) by giving the WindowModel role a unique
name (PagerStackingOrder).
2026-11-01 16:44:37 +00:00
Niccolò Venerandi
7a52a6b554 applets/pager: Let window icons grow with their window outlines
With "Show application icons on window outlines" enabled, the icons
stay at the small icon size (16 px at 100% scale) no matter how large
the panel or the windows are.

Size the icon from the smaller side of the outline, keeping the same
spacing as before, and raise the cap to iconSizes.medium. Small window
outlines get the same icon size as before.

BUG: 518625
2026-10-28 16:27:20 +01:00
Niccolò Venerandi
64b9cc4f13 applets/pager: Keep desktop labels and window icons bound to the model
The label is created with a createObject call, which fixes the
label and icon values in place on creation. This commits adds
a binding so that they update over time.

BUG: 522322
BUG: 501660
BUG: 506247
2026-10-22 22:32:15 +02:00
l10n daemon script
ac251b9878 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-10-05 01:51:33 +00:00
Christoph Wolk
db1d6b066f drop qmllint disable unqualified
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.
2026-09-04 08:21:45 +00:00
l10n daemon script
f4460d43a4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-07-23 01:40:11 +00:00
Kai Uwe Broulik
58b09b2d1d Remove unused Plasma::Plasma linkage
They don't use any Plasma stuff from C++.
2026-07-20 13:09:10 +00:00
Andreas Sturmlechner
4473417ff7 applets/pager: Drop obsolete X11 bits
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2026-06-04 15:17:05 +02:00
Andreas Sturmlechner
7138c3b72d applets/pager: Allow to build without X11-enabled KWindowSystem and PW
ifdefing xwindowtasksmodel.h and KX11Extras

Uses available HAVE_X11; amends 58a6fc0745

So far this required plasma-workspace to be built with -DWITH_X11.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2026-06-02 23:15:25 +02:00
Hynek Schlindenbuch
b5bd3f9846 Add support for per-output virtual desktops
See [kwin MR](https://invent.kde.org/plasma/kwin/-/merge_requests/8602) for more details.
2026-04-14 08:12:12 +00:00
Nicolas Fella
a2da61f89f Disable qmllint for pager applet
Due to https://qt-project.atlassian.net/browse/QTBUG-145572
2026-04-03 14:09:13 +02:00
Christoph Wolk
efae79c7a0 applets/pager: handle switching activities better in desktop widget
When a (virtual desktop) pager is on the desktop and the user
switches activities, it will cause a runtime error. As far as I can
tell, this is because the widget itself is not switching activities,
and can't access the proper tasks model for the virtual desktops on
the new activities. The specific cause of the runtime error is the
desktopId binding, which is only used for drag&drop handling, so is
not relevant while on a different activity's desktop.

Instead, access the property only if the task model is actually there.
2026-02-19 11:45:13 +00:00
l10n daemon script
b770810416 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-02-13 01:40:43 +00:00
Christoph Wolk
61f7cdcf42 applets/pager: avoid binding order issue on vdesktop layout changes
The pager applet uses several properties to set the number of rows and
columns for the virtual desktop grid. This causes a binding order issue
that happens when the number of rows is reduced, and for desktop widgets
during startup: the layout (during the intermediate stages) is too small
to fit everything. The problem is easiest to follow with row changes:
assume a 2×2 grid, rows is bound to effectiveRows (calculated to be
2), columns similarly for effectiveColumns. Now we chenge the layout to
be a single row, so it should be 1×4. If effectiveRows and the rows
binding on it is updated first, it will now be 1, yielding a layout of
1×2, which is not large enough to fit the 4 virtual desktops, causing
Grid to complain loudly.

Instead, we change the binding for rows and columns to be the virtual
desktop count if effectiveRows × effectiveColumns is too small. This way
the intermediate stage is guaranteed to be large enough, and after the
other one is updated it will settle on the correct value when the
changed signal updates the binding.
2026-02-05 14:20:39 +00:00
l10n daemon script
d287cea212 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-02-03 01:44:19 +00:00
l10n daemon script
525945b6ff SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-01-30 01:40:30 +00:00
Christoph Wolk
9c1becd7bb add translation contexts
This change adds translation contexts to all translatable strings in qml
files that did not have any. Occasionally, the existing translation
contexts are updated for consistency with the newly added ones.

The string themselves are unchanged, save for one instance where the
Accessible strings were somewhat awkward and were a bit streamlined, and
one set of accessible  strings in PanelConfiguration that were not
marked as translatable, but are now.

Co-authored-by: Nate Graham <nate@kde.org>
2026-01-07 10:44:24 +00:00
Nicolas Fella
29f445b973 applets/pager: Don't shadow active property
ToolTipArea already has a property active, which is *not* what we want to set here

Rename the property to isCurrent to avoid confusion
2026-01-02 14:22:55 +01:00
Laurent Montel
4ee42c7d66 Fix some cppcheck:
- use explicit
- use const'ref
- remove duplicate check
2025-12-21 09:29:09 +00:00
Tobias Fella
a3a22b7fc3 applets/pager: Port to plasma_add_applet 2025-12-07 17:03:33 +00:00
Yifan Zhu
e772e77e84 applets/pager: fix undefined properties
865364c0b0 removed the target property in
PropertyChanges. Hence we need to qualify the properties.
2025-12-02 13:02:21 -08:00
Christoph Wolk
865364c0b0 applets/pager: linting
- Switch to required properties and ComponentBehavior: Bound
- Make some types explicitly defined
- the usual: qualify properties, mark i18n calls unqualified, unversion
  imports...
2025-11-27 17:04:38 +00:00
l10n daemon script
266c71e737 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-09-09 02:09:21 +00:00
Efe Çiftci
93d8439a25 applets/pager: add X11/Wayland KCM detection
The Pager's "Configure Virtual Desktops" context menu option fails to open the associated KCM on X11, because its name is `kcm_kwin_virtualdesktops_x11` instead of `kcm_kwin_virtualdesktops`. This commit adds session type detection and opens the correct KCM depending on whether the session is running under Wayland or X11.
2025-08-13 08:09:46 -06:00
Marco Martin
6172768dd7 applets/pager: Disconnect desktopPositionsChanged before reconnecting
desktopPositionsChanged was reconnected every time refreshDataSource was
called, since this is called often, after a while connections
accumulated and can go as far as causing a several reconds freeze
every time desktopPositionsChanged was emitted.
Like the other connections, disconnect before reconnecting
2025-07-14 10:45:47 +02:00
Marco Martin
68c6480169 applets/pager: listen to virtual desktop reordering
When the virtual desktop order is changed from the desktop grid effect, listen to the positions change and reorder the model to reflect the same order in the pager
2025-06-11 11:34:49 +00:00
Nate Graham
2f89315363 Correct Bugzilla URLs
BUG: 505340
FIXED-IN: 6.3.6
2025-06-09 15:11:49 -06:00
Nate Graham
11d35be2d3 Improve some UI, context, and accessible strings
Closes #148
2025-06-05 17:08:57 -06:00
l10n daemon script
4870e97d70 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-04-05 01:31:06 +00:00
Akseli Lahtinen
2062574e87
pager: remove onContainsMouseChanged, refresh model after desktopMouseArea.clicked
Due to refreshing the pager twice on mouse release and having two
different mouse drag tracking areas, these could get out of sync.
This caused the pagerModel refresh too early and lose any changes.
This changes it to only refresh after mouse is released, either when
dragging a window or clicking a desktop.

BUG:500236
2025-02-18 16:09:53 +02:00
Niccolò Venerandi
4493b07d29 Treat StackingOrder as int instead of list
The StackingOrder is a int; trying to convert it into a
QList resulted in an always-empty list, which then gave
us 0 as the stacking order of any window.

BUG:497506
2025-02-10 13:33:37 +00:00
Kai Uwe Broulik
1594009754 applets/pager: Port QX11Info to QNativeInterface
Avoids depending on GuiPrivate.
2025-01-31 11:48:55 +00:00
l10n daemon script
62302ae6e9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-15 01:39:43 +00:00
Laurent Montel
edc07e1374 Add missing include moc 2024-12-11 06:20:21 +00:00
Laurent Montel
bb4f8fedc4 const'ify pointer 2024-12-07 08:43:37 +00:00
Vlad Zahorodnii
8f2b64e329 applets/pager: Remove animations
The pager applet provides a miniature of the virtual desktop grid and by
default, it's placed in the panel. On the other hand, the main purpose of
animations is to notify or guide the user through state changes. Due to
the location and the size of the pager, the user focus will likely be
elsewhere and these animations will go unnoticed.

Unfortunately, these animations have caused some issues too. One was with
drag and drop. 463b6798ae attempted to
address that by dropping x and y animations. That change should have
probably dropped width and height animations too because they alone don't
serve the real purpose. Another issue is caused by flaws in the animation
driving code in QtQuick, which can result in plasmashell triggering
constant repaints until the panel that contains the pager is shown again.

So, given the aforementioned issues and small net benefit of these
animations, this change drops animations in the pager. It is not the
definite fix for upstream issues but it should at least help us mitigate
repaint issues that can be observed on setups with the current defaults.

CCBUG: 487895
2024-10-02 15:32:41 +00:00
l10n daemon script
18eaf61502 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-12 01:21:58 +00:00
Christoph Wolk
de63807317 applets/pager: add activity kcm to context menu
The virtual desktop version of the pager contains a context menu entry
that allows directly accessing the corresponding kcm, as does the
activity bar widget. The activity version of the pager, however, does
not have easy access to the activity kcm.

This change adds such an entry to the context menu and adds translation
context. It also removes the ellipsis from the "Show Activity Manager"
menu entry, as the activity manager is shown without further user input.
2024-08-30 02:48:15 +00:00
l10n daemon script
fc053234df SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-28 01:29:48 +00:00
ivan tkachenko
3dbc8ea76f
applets/pager: Minor code style improvements 2024-08-09 22:21:35 +02:00
Christian Muehlhaeuser
432bb86d28 applets/pager: make window outlines optional
Hiding window outlines makes for a cleaner look if you're typically
just using the pager to switch desktops/activities.

The default settings remain intact (visible window outlines).
2024-08-09 15:46:40 +02:00
Nicolas Fella
4e9c996c98 [applets/pager] Remove unused link target 2024-07-16 12:34:52 +00:00
Nicolas Fella
583da9de91 [applets/pager] Port to declarative type registration 2024-07-16 12:34:52 +00:00
Nicolas Fella
86811c200a Remove unused includes 2024-07-16 12:34:52 +00:00
l10n daemon script
bcdca2186b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-28 01:24:52 +00:00
Nicolas Fella
eec9ebbb43 Run clang-format 2024-04-13 01:19:33 +02:00
Fushan Wen
36ba60eadb Set text format to plaintext for labels
This makes the labels more efficient as text content doesn't need to go through Qt::mightBeRichText.
2024-01-22 16:58:01 +00:00
l10n daemon script
30dcf97c13 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-08 02:09:55 +00:00
l10n daemon script
b77963f557 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-12-19 02:07:34 +00:00