┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2011-12-04 14:10:20 +0100
committerFrank Reininghaus <[email protected]>2011-12-04 17:44:59 +0100
commit0dce0b3bef7a138a68ced9c3d5c61315ea4c83ef (patch)
tree0aa7b896a8ba7dc055ca0ffd75ca73b16695068f
parent82b20ff58e9448868cf23783dcaf1fe304707791 (diff)
Update the zoom slider if the previews setting is changed
This is important if the zoom levels are different with previews enabled/disabled.
-rw-r--r--src/statusbar/dolphinstatusbar.cpp8
-rw-r--r--src/statusbar/dolphinstatusbar.h1
2 files changed, 9 insertions, 0 deletions
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();