diff options
| author | weinan li <[email protected]> | 2025-10-29 10:31:09 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-10-29 10:31:09 +0000 |
| commit | 476cb0af843a26ebdd509c5b400532d20f71dcb2 (patch) | |
| tree | 48fef15f32257440ea5f70f03f8282beafb2990c /src/views/dolphinview.cpp | |
| parent | 74e0d53c6fb80615ce798c89a81ef162ee751a27 (diff) | |
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.
BUG: 482322
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 8a7693fc6..78e718bf2 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1769,11 +1769,9 @@ Qt::SortOrder DolphinView::defaultSortOrderForRole(const QByteArray &role) void DolphinView::resetZoomLevel() { ViewModeSettings settings{m_mode}; - settings.useDefaults(true); - const int defaultIconSize = settings.iconSize(); - settings.useDefaults(false); + const int userDefaultIconSize = settings.iconSize(); - setZoomLevel(ZoomLevelInfo::zoomLevelForIconSize(QSize(defaultIconSize, defaultIconSize))); + setZoomLevel(ZoomLevelInfo::zoomLevelForIconSize(QSize(userDefaultIconSize, userDefaultIconSize))); } void DolphinView::observeCreatedItem(const QUrl &url) |
