┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/statusbar
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2014-02-27 09:15:54 +0100
committerFrank Reininghaus <[email protected]>2014-02-27 09:15:54 +0100
commit80305554f4dc28003dab35a0687842f7bb03e9de (patch)
tree1283cae69353b79cefc67d0c40ec46c499cc2ea8 /src/statusbar
parent1eadb296e55b3f3cb455921920e990bd9836549d (diff)
parent006f667ab14aff2d067373e7e88bde4800b2d9c2 (diff)
Merge branch 'KDE/4.13'
Diffstat (limited to 'src/statusbar')
-rw-r--r--src/statusbar/dolphinstatusbar.cpp14
-rw-r--r--src/statusbar/dolphinstatusbar.h12
2 files changed, 13 insertions, 13 deletions
diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp
index 671ef4f96..169395e63 100644
--- a/src/statusbar/dolphinstatusbar.cpp
+++ b/src/statusbar/dolphinstatusbar.cpp
@@ -73,6 +73,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
m_zoomSlider->setRange(ZoomLevelInfo::minimumLevel(), ZoomLevelInfo::maximumLevel());
connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SIGNAL(zoomLevelChanged(int)));
+ connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(updateZoomSliderToolTip(int)));
connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(showZoomSliderToolTip(int)));
// Initialize space information
@@ -240,7 +241,6 @@ void DolphinStatusBar::setZoomLevel(int zoomLevel)
{
if (zoomLevel != m_zoomSlider->value()) {
m_zoomSlider->setValue(zoomLevel);
- updateZoomSliderToolTip(zoomLevel);
}
}
@@ -338,6 +338,12 @@ void DolphinStatusBar::slotResetToDefaultText()
updateLabelText();
}
+void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel)
+{
+ const int size = ZoomLevelInfo::iconSizeForZoomLevel(zoomLevel);
+ m_zoomSlider->setToolTip(i18ncp("@info:tooltip", "Size: 1 pixel", "Size: %1 pixels", size));
+}
+
void DolphinStatusBar::setExtensionsVisible(bool visible)
{
bool showSpaceInfo = visible;
@@ -350,10 +356,4 @@ void DolphinStatusBar::setExtensionsVisible(bool visible)
m_zoomSlider->setVisible(showZoomSlider);
}
-void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel)
-{
- const int size = ZoomLevelInfo::iconSizeForZoomLevel(zoomLevel);
- m_zoomSlider->setToolTip(i18ncp("@info:tooltip", "Size: 1 pixel", "Size: %1 pixels", size));
-}
-
#include "dolphinstatusbar.moc"
diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h
index b2afe2eb9..4d6dbb20f 100644
--- a/src/statusbar/dolphinstatusbar.h
+++ b/src/statusbar/dolphinstatusbar.h
@@ -122,6 +122,12 @@ private slots:
*/
void slotResetToDefaultText();
+ /**
+ * Updates the text of the zoom slider tooltip to show
+ * the currently used size.
+ */
+ void updateZoomSliderToolTip(int zoomLevel);
+
private:
/**
* Makes the space information widget and zoom slider widget
@@ -131,12 +137,6 @@ private:
*/
void setExtensionsVisible(bool visible);
- /**
- * Updates the text of the zoom slider tooltip to show
- * the currently used size.
- */
- void updateZoomSliderToolTip(int zoomLevel);
-
private:
QString m_text;
QString m_defaultText;