From 6f1c9ca1b96212bdd1bede8e38ecfa64d98edb84 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 13 Mar 2008 21:48:24 +0000 Subject: [PATCH] Don't force that the preview size must be >= the icon size. This gets confusing when the user uses the Zoom In/Zoom Out feature inside a view a lot (e. g. by Ctrl + scroll wheel). This is because decreasing the preview size would also decrease the icon size, but when increasing the preview size again the icon size remains... I even got confused myself by this "feature" although I knew the reason for it ;-) svn path=/trunk/KDE/kdebase/apps/; revision=785373 --- src/dolphiniconsview.cpp | 10 ---------- src/iconsizedialog.cpp | 13 ------------- 2 files changed, 23 deletions(-) diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index e32eee1a5..45fbf25b2 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -326,10 +326,6 @@ void DolphinIconsView::zoomIn() } 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 @@ -353,11 +349,6 @@ void DolphinIconsView::zoomOut() if (showPreview) { const int previewSize = decreasedIconSize(settings->previewSize()); settings->setPreviewSize(previewSize); - if (settings->iconSize() > previewSize) { - // assure that the icon size is always <= the preview size - newIconSize = previewSize; - settings->setIconSize(newIconSize); - } } else { newIconSize = decreasedIconSize(settings->iconSize()); settings->setIconSize(newIconSize); @@ -443,7 +434,6 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount) if (showPreview) { const int previewSize = settings->previewSize(); const int diff = previewSize - size; - Q_ASSERT(diff >= 0); itemWidth += diff; itemHeight += diff; diff --git a/src/iconsizedialog.cpp b/src/iconsizedialog.cpp index f4a717114..00f1c7b2e 100644 --- a/src/iconsizedialog.cpp +++ b/src/iconsizedialog.cpp @@ -136,12 +136,7 @@ void IconSizeDialog::slotButtonClicked(int button) { if (button == Ok) { m_iconSize = iconSize(m_iconSizeSlider->value()); - m_previewSize = iconSize(m_previewSizeSlider->value()); - if (m_previewSize < m_iconSize) { - // assure that the preview size is never smaller than the icon size - m_previewSize = m_iconSize; - } } KDialog::slotButtonClicked(button); @@ -150,18 +145,10 @@ void IconSizeDialog::slotButtonClicked(int button) void IconSizeDialog::updateIconSize(int value) { m_iconSizeViewer->setPixmap(KIconLoader::global()->loadIcon("folder", KIconLoader::Desktop, iconSize(value))); - if (m_previewSizeSlider != 0) { - updatePreviewSize(m_previewSizeSlider->value()); - } } void IconSizeDialog::updatePreviewSize(int value) { - const int iconSizeValue = m_iconSizeSlider->value(); - if (value < iconSizeValue) { - // assure that the preview size is never smaller than the icon size - value = iconSizeValue; - } m_previewSizeViewer->setPixmap(KIconLoader::global()->loadIcon("preview", KIconLoader::Desktop, iconSize(value))); } -- 2.47.3