- if (isZoomInPossible()) {
- IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
-
- const int oldIconSize = settings->iconSize();
- int newIconSize = oldIconSize;
-
- const bool showPreview = m_controller->dolphinView()->showPreview();
- if (showPreview) {
- const int previewSize = increasedIconSize(settings->previewSize());
- settings->setPreviewSize(previewSize);
- } else {
- newIconSize = increasedIconSize(oldIconSize);
- settings->setIconSize(newIconSize);
- if (settings->previewSize() < newIconSize) {
- // assure that the preview size is always >= the icon size
- settings->setPreviewSize(newIconSize);
- }
- }
-
- // increase also the grid size
- const int diff = newIconSize - oldIconSize;
- settings->setItemWidth(settings->itemWidth() + diff);
- settings->setItemHeight(settings->itemHeight() + diff);
-
- const int infoCount = m_controller->dolphinView()->additionalInfo().count();
- updateGridSize(showPreview, infoCount);
- }
+ const DolphinView* view = m_controller->dolphinView();
+ const bool showPreview = view->showPreview();
+ updateGridSize(showPreview, view->additionalInfo().count());