- Add zoom setings for each view kind
- Save and restore zoom when view is changed
- Add default icon size of 64 px for icons view and 32px for compact view
Details
- Reviewers
ngraham - Group Reviewers
Frameworks - Maniphest Tasks
- T8552: Polish Open/Save dialogs
- Commits
- R241:69754bfed154: Always save view settings when switching from one view mode to another
Diff Detail
- Repository
- R241 KIO
- Branch
- icon-save2
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 12224 Build 12242: arc lint + arc unit
Nice! What do you think about moving the if (configGroup && itemView) { into the new function and calling it something more conditional, like writeIconZoomSettingsIfNeeded? Also it seems like there could be some code shared in a new function so that KDirOperator::Private::iconSizeForViewType() and KDirOperator::Private::writeIconZoomSettings() don't have to have so much duplicated code. They're both in the same scope so they have access to the same set of variables which should hopefully make it possible.
Rename writeIconZoomSettings to writeIconZoomSettingsIfNeeded, some code improvements
Add a zoomSettingsForViewForView to group viewKind to zoom setting name and default value
I did your two nice suggestions. See writeIconZoomSettingsIfNeeded and zoomSettingsForViewForView.
src/filewidgets/kdiroperator.cpp | ||
---|---|---|
2713 | Perhaps we could use a more sensible default value for ColumnView. What would you say about 32px ? |
src/filewidgets/kdiroperator.cpp | ||
---|---|---|
2713 | That sounds like a good default size. |
If you're going to rename the functions because these actions no longer really toggle anything, I think we need to keep a verb in there. Suggest something like _k_slotShowDetailsView or _k_slotSwitchToDetailsView
Otherwise LGTM in terms of code and behavior!
I was renaming those just to be consistent with the already existing similar functions _k_slotDetailedView() _k_slotSimpleView() _k_slotTreeView() and _k_slotDetailedTreeView.
I don't have a strong opinion about adding a verb or keeping as it is now.
Given the added information, I will follow recommendation.