X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/df8f2e3646017bf6ba99bb18ef0df7defaf2eb10..ec00f379dc42b00a64ab1af25bb4bb1a06bd7449:/src/iconsizedialog.cpp diff --git a/src/iconsizedialog.cpp b/src/iconsizedialog.cpp index 044f150c1..da5c66e2f 100644 --- a/src/iconsizedialog.cpp +++ b/src/iconsizedialog.cpp @@ -24,14 +24,14 @@ #include "dolphin_iconsmodesettings.h" -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include IconSizeDialog::IconSizeDialog(QWidget* parent) : KDialog(parent), @@ -49,7 +49,7 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) : const int spacing = KDialog::spacingHint(); - setCaption(i18n("Change Icon & Preview Size")); + setCaption(i18nc("@title:window", "Change Icon & Preview Size")); setButtons(Ok | Cancel); setDefaultButton(Ok); @@ -57,19 +57,19 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) : QHBoxLayout* topLayout = new QHBoxLayout(); // create 'Icon Size' group including slider and preview - QGroupBox* iconSizeBox = new QGroupBox(i18n("Icon Size"), main); + QGroupBox* iconSizeBox = new QGroupBox(i18nc("@title:group", "Icon Size"), main); - const QColor iconBackgroundColor(KGlobalSettings::baseColor()); + const QColor iconBackgroundColor = KColorScheme(KColorScheme::View).background(); KHBox* iconSizeHBox = new KHBox(iconSizeBox); iconSizeHBox->setSpacing(spacing); - new QLabel(i18nc("Size", "Small"), iconSizeHBox); + new QLabel(i18nc("@item:inrange Icon Size", "Small"), iconSizeHBox); m_iconSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, iconSizeHBox); m_iconSizeSlider->setValue(sliderValue(settings->iconSize())); m_iconSizeSlider->setTickmarks(QSlider::TicksBelow); connect(m_iconSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateIconSize(int))); - new QLabel(i18nc("Size", "Large"), iconSizeHBox); + new QLabel(i18nc("@item:inrange Icon Size", "Large"), iconSizeHBox); m_iconSizeViewer = new PixmapViewer(iconSizeBox, PixmapViewer::SizeTransition); m_iconSizeViewer->setMinimumWidth(K3Icon::SizeEnormous); @@ -82,17 +82,17 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) : iconSizeLayout->addWidget(m_iconSizeViewer); // create 'Preview Size' group including slider and preview - QGroupBox* previewSizeBox = new QGroupBox(i18n("Preview Size"), main); + QGroupBox* previewSizeBox = new QGroupBox(i18nc("@title:group", "Preview Size"), main); KHBox* previewSizeHBox = new KHBox(previewSizeBox); previewSizeHBox->setSpacing(spacing); - new QLabel(i18nc("Size", "Small"), previewSizeHBox); + new QLabel(i18nc("@item:inrange Preview Size", "Small"), previewSizeHBox); m_previewSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, previewSizeHBox); m_previewSizeSlider->setValue(sliderValue(settings->previewSize())); m_previewSizeSlider->setTickmarks(QSlider::TicksBelow); connect(m_previewSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreviewSize(int))); - new QLabel(i18nc("Size", "Large"), previewSizeHBox); + new QLabel(i18nc("@item:inrange Preview Size", "Large"), previewSizeHBox); m_previewSizeViewer = new PixmapViewer(previewSizeBox, PixmapViewer::SizeTransition); m_previewSizeViewer->setMinimumWidth(K3Icon::SizeEnormous); @@ -133,14 +133,8 @@ void IconSizeDialog::updateIconSize(int value) { KIconLoader iconLoader; m_iconSizeViewer->setPixmap(iconLoader.loadIcon("folder", K3Icon::Desktop, iconSize(value))); - if (m_previewSizeSlider != 0) { - int previewSizeValue = m_previewSizeSlider->value(); - if (previewSizeValue < value) { - // assure that the preview size is never smaller than the icon size - previewSizeValue = value; - } - updatePreviewSize(previewSizeValue); + updatePreviewSize(m_previewSizeSlider->value()); } }