From 0dce0b3bef7a138a68ced9c3d5c61315ea4c83ef Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 4 Dec 2011 14:10:20 +0100 Subject: [PATCH] Update the zoom slider if the previews setting is changed This is important if the zoom levels are different with previews enabled/disabled. --- src/statusbar/dolphinstatusbar.cpp | 8 ++++++++ src/statusbar/dolphinstatusbar.h | 1 + 2 files changed, 9 insertions(+) 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(); -- 2.47.3