diff options
Diffstat (limited to 'src/zoombar.cpp')
-rw-r--r-- | src/zoombar.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/zoombar.cpp b/src/zoombar.cpp index 485d71a9..b07aee03 100644 --- a/src/zoombar.cpp +++ b/src/zoombar.cpp @@ -124,11 +124,19 @@ void ZoomBar::show() // show findbar if not visible if (isHidden()) { + emit visibilityChanged(true); QWidget::show(); } } +void ZoomBar::hide() +{ + emit visibilityChanged(false); + QWidget::hide(); +} + + void ZoomBar::zoomIn() { setValue(m_zoomSlider->value() + 1); @@ -168,14 +176,7 @@ void ZoomBar::setValue(int value) } -void ZoomBar::setVisible(bool visible) -{ - emit visibilityChanged(visible); - QWidget::setVisible(visible); -} - - void ZoomBar::toggleVisibility() { - setVisible(!isVisible()); + isVisible() ? hide() : show(); } |