Bug 482322

Summary: Keyboard shortcut Ctrl+0 should reset to user set default icon size and not the smallest icon size
Product: [Applications] dolphin Reporter: SigHunter <sighunter>
Component: view-engine: details modeAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: dolphin-bugs-null, fanzhuyifan, filip.kendes1, madness742
Priority: NOR Keywords: qt6
Version First Reported In: 24.08.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description SigHunter 2024-03-03 16:10:45 UTC
SUMMARY
Premise:
I use the details view for everything and I've set "use same style for all directories" (paraphrased)
In dolphin's settings under "View" you can set a default icon size (16 px, 32 px, 48 px, etc.)
By default there is a keyboard shortcut Ctrl+0 called "Reset Zoom Level". 

The problem:
The keyboard shortcut Ctrl+0 always resets icon size to smallest zoom level (16 px) and not to the user configured _default_ icon size. In my opinion, this is a bug. I want the icons to always be 32 px and the shortcut to reset it back to default does some arbitrary other size that I never use. I have to press Ctrl+0, Ctrl++, Ctrl++ to get my desired size.

The solution: 
Ctrl+0 should use the configured default icon size or preview size for the current view mode (icons, compact, details) and not the smallest size

STEPS TO REPRODUCE
1. configure user default icon size or preview size in dolphin's settings
2. change size to anything larger than 16 px
3. press ctrl+0 in normal view (not settings)

OBSERVED RESULT
icon size gets set back to the smallest possible icon size (16 px)

EXPECTED RESULT
icon size should get set to the user configured default size

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
I hope you agree with my proposal. Dolphin is awesome :-)
Comment 1 SigHunter 2024-10-16 20:45:33 UTC
to keep this updated:

this is still the case with latest Dolphin 24.08.2
in short: "reset zoom level" keyboard shortcut should set icon size to user configured default, not smallest icon size

Tested on
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.3
Kernel Version: 6.11.3-gentoo-dist (64-bit)
Graphics Platform: Wayland
Processors: 20 × Intel® Core™ i9-10850K CPU @ 3.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2
Comment 2 Filip 2025-01-03 08:53:25 UTC
Can confirm in Dolphin 24.12.0
Comment 3 Filip 2025-01-03 08:54:18 UTC
It affects all view modes
Comment 4 Bug Janitor Service 2025-10-29 08:02:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1080
Comment 5 Méven 2025-10-29 10:31:13 UTC
Git commit 476cb0af843a26ebdd509c5b400532d20f71dcb2 by Méven Car, on behalf of weinan li.
Committed on 29/10/2025 at 10:31.
Pushed by meven into branch 'master'.

dolphinView: resetZoomLevel: reset to user defined default zoom

Instead of ViewModeSettings default mode.

The original resetZoomLevel() implementation used settings.useDefaults(true) to force reading the system's hardcoded default icon size (typically 16px), ignoring the user's custom default size configured in Dolphin's View settings. This caused Ctrl+0 to reset icons to the minimum size instead of the user's preferred default.

This patch removes the useDefaults(true) call, allowing ViewModeSettings::iconSize() to directly retrieve the user-configured default icon size. Ctrl+0 now correctly resets to the size the user set in Dolphin's settings, aligning with expected behavior.

M  +2    -4    src/views/dolphinview.cpp

https://invent.kde.org/system/dolphin/-/commit/476cb0af843a26ebdd509c5b400532d20f71dcb2
Comment 6 Méven 2025-11-02 19:05:16 UTC
Git commit 70cd6c09296033f7de847d7006062e802b6e6473 by Méven Car.
Committed on 02/11/2025 at 19:05.
Pushed by meven into branch 'release/25.08'.

dolphinView: resetZoomLevel: reset to user defined default zoom

Instead of ViewModeSettings default mode.

The original resetZoomLevel() implementation used settings.useDefaults(true) to force reading the system's hardcoded default icon size (typically 16px), ignoring the user's custom default size configured in Dolphin's View settings. This caused Ctrl+0 to reset icons to the minimum size instead of the user's preferred default.

This patch removes the useDefaults(true) call, allowing ViewModeSettings::iconSize() to directly retrieve the user-configured default icon size. Ctrl+0 now correctly resets to the size the user set in Dolphin's settings, aligning with expected behavior.


(cherry picked from commit 476cb0af843a26ebdd509c5b400532d20f71dcb2)

Co-authored-by: weinan li <liweinan@kylinos.cn>

M  +2    -4    src/views/dolphinview.cpp

https://invent.kde.org/system/dolphin/-/commit/70cd6c09296033f7de847d7006062e802b6e6473