diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-02-25 19:41:45 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-02-25 19:41:45 +0100 |
| commit | c5d9791ad392efffa19108c3ce7a4e6a67453a09 (patch) | |
| tree | 9a273177b0bb6077232afd14fa6e2f17c992da80 /src/statusbar/dolphinstatusbar.cpp | |
| parent | 9a9ab6e50cbfaee56a3d3b84ed7bea2f987985df (diff) | |
Show the correct icon size in the zoom slider tooltip.
BUG: 305694
FIXED-IN: 4.12.3
REVIEW: 111197
Diffstat (limited to 'src/statusbar/dolphinstatusbar.cpp')
| -rw-r--r-- | src/statusbar/dolphinstatusbar.cpp | 14 |
1 files changed, 7 insertions, 7 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" |
