Bug 449069 - Icons on desktop sorted by name and aligned to right side are sorted from right to left
Summary: Icons on desktop sorted by name and aligned to right side are sorted from rig...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 6.1.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks: 503500
  Show dependency treegraph
 
Reported: 2022-01-24 11:25 UTC by Patrick Silva
Modified: 2025-08-01 14:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.0
Sentry Crash Report:


Attachments
bug - icons are sorted from right to left (824.86 KB, image/png)
2022-01-24 11:25 UTC, Patrick Silva
Details
expected - icons are sorted from left to right (824.21 KB, image/png)
2022-01-24 11:26 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-01-24 11:25:52 UTC
Created attachment 145850 [details]
bug - icons are sorted from right to left

STEPS TO REPRODUCE
1. add several icons to desktop
2. right-click on desktop, choose 'Configure desktop and wallpapers...', click on 'Icons' in the left side
3. arrange icons in columns, align icons to right, sort icons by name, check 'Folders first'
4. click on 'OK' button

OBSERVED RESULT
icons on desktop are sorted from right to left. Compare the attached screenshots please.

EXPECTED RESULT
iocns on desktop should be sorted from left to right

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 1 Patrick Silva 2022-01-24 11:26:36 UTC
Created attachment 145851 [details]
expected - icons are sorted from left to right
Comment 2 Patrick Silva 2022-01-24 11:31:31 UTC
The same happens if the icons on desktop are arranged in rows.
Comment 3 Nate Graham 2022-01-24 22:25:38 UTC
Can confirm.
Comment 4 TraceyC 2024-08-01 00:43:47 UTC
This seems related to general mishandling of icons on the desktop ex: https://bugs.kde.org/show_bug.cgi?id=468546
Comment 5 Akseli Lahtinen 2024-11-06 16:30:49 UTC
Git commit cc44615b34dacc2a4acfdc82de885c943318a7f6 by Akseli Lahtinen.
Committed on 06/11/2024 at 16:30.
Pushed by akselmo into branch 'master'.

Refactor icon positioner saving and loading

The icon positioner saving and loading is handled by QML, which makes it a bit difficult
to work with the logic in positioner CPP files.

This change does the following:
- Explicitly save only on user interactions
- Moved the save and load of config to positioner.cpp
  - Easier debugging of the saving and loading functions
  - Still uses the JSON style of save/loading like the old one
    - Technically should be compatible with the old config, which was also JSON.
- Makes positionerApplet accessible from FolderView qml
- Various checks for checking if screen is enabled or not to avoid doing unnecessary work when screen is off
- A lot of fixes to avoid any racing conditions
- Removed any timers
- Added various unit tests

Alternative to https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2603
Related: bug 482875, bug 494874, bug 472137, bug 433867, bug 494412, bug 468619, bug 495047, bug 453314
FIXED-IN: 6.3.0

M  +1    -1    containments/desktop/package/contents/ui/FolderView.qml
M  +1    -48   containments/desktop/package/contents/ui/FolderViewLayer.qml
M  +165  -26   containments/desktop/plugins/folder/autotests/positionertest.cpp
M  +18   -3    containments/desktop/plugins/folder/autotests/positionertest.h
M  +23   -7    containments/desktop/plugins/folder/foldermodel.cpp
M  +5    -0    containments/desktop/plugins/folder/foldermodel.h
M  +176  -60   containments/desktop/plugins/folder/positioner.cpp
M  +37   -8    containments/desktop/plugins/folder/positioner.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/cc44615b34dacc2a4acfdc82de885c943318a7f6
Comment 6 Patrick Silva 2024-11-27 11:35:37 UTC
The bug persists on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 7 TraceyC 2024-11-27 14:44:24 UTC
This bug is fixed in Plasma 6.3.0, and I see your system has 
KDE Plasma Version: 6.2.80

If the bug still happens on your Neon system when its updated to Plasma 6.3.0, feel free to re-open this report.
Comment 8 TraceyC 2024-11-27 15:12:34 UTC
Sorry, I've realized 6.2.80 is the equivalent of what will become 6.3. My apologies.
Comment 9 Akseli Lahtinen 2025-07-04 09:21:49 UTC
I can confirm this. I think we may have to add separate "arrange" setting for this, since people using RTL languages may want it to be from right to left.
Comment 10 Nate Graham 2025-07-04 14:31:56 UTC
We should reverse whatever the user has chosen if we're in RTL mode, yeah. You can check out what the Task Manager does here.
Comment 11 Bug Janitor Service 2025-08-01 13:18:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3132
Comment 12 Bug Janitor Service 2025-08-01 14:14:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3133
Comment 13 Akseli Lahtinen 2025-08-01 14:50:34 UTC
Git commit 72511db0c3a61d841c6911a606bf945a02504803 by Akseli Lahtinen.
Committed on 01/08/2025 at 14:50.
Pushed by akselmo into branch 'master'.

Change presentation for icon alignment

Icon alignment can be a bit confusing, so let's rename the fields to
something more fitting.

Arrangement is changed from Left-to-Right/Top-to-Bottom to In Columns/In
Rows.

Alignment is changed to Sort Alignment, since it both sorts and aligns
the icons in different direction. That uses Left-to-Right/Right-to-Left
language.

M  +15   -7    containments/desktop/package/contents/ui/ConfigIcons.qml
M  +8    -7    containments/desktop/plugins/folder/viewpropertiesmenu.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/72511db0c3a61d841c6911a606bf945a02504803
Comment 14 Nate Graham 2025-08-01 14:51:21 UTC
So it turns out the behavior was not a bug, but rather a poorly-communicated feature. The above commit changes the presentation in the config window and context menu to hopefully make that clearer.