From: Frank Reininghaus Date: Sun, 4 Dec 2011 13:10:20 +0000 (+0100) Subject: Update the zoom slider if the previews setting is changed X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/0dce0b3bef7a138a68ced9c3d5c61315ea4c83ef?ds=sidebyside Update the zoom slider if the previews setting is changed This is important if the zoom levels are different with previews enabled/disabled. --- diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 681fbf407..c733ebe02 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -74,6 +74,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setZoomLevel(int))); connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(showZoomSliderToolTip(int))); connect(m_view, SIGNAL(zoomLevelChanged(int,int)), this, SLOT(slotZoomLevelChanged(int,int))); + connect(m_view, SIGNAL(previewsShownChanged(bool)), this, SLOT(slotPreviewsShownChanged(bool))); // Initialize space information m_spaceInfo = new StatusBarSpaceInfo(this); @@ -328,6 +329,13 @@ void DolphinStatusBar::slotZoomLevelChanged(int current, int previous) m_zoomSlider->setValue(current); } +void DolphinStatusBar::slotPreviewsShownChanged(bool shown) +{ + Q_UNUSED(shown); + // The zoom level might be different with/without previews -> update the zoom slider. + m_zoomSlider->setValue(m_view->zoomLevel()); +} + void DolphinStatusBar::updateProgressInfo() { const bool isErrorShown = (m_messageLabel->type() == KonqStatusBarMessageLabel::Error); diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h index 7d56746f6..32d603ac5 100644 --- a/src/statusbar/dolphinstatusbar.h +++ b/src/statusbar/dolphinstatusbar.h @@ -139,6 +139,7 @@ private slots: void showZoomSliderToolTip(int zoomLevel); void slotZoomLevelChanged(int current, int previous); + void slotPreviewsShownChanged(bool shown); void updateProgressInfo();