diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-14 19:35:42 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-14 19:35:42 +0200 |
commit | c265c4a38887b65243ec6c9537c9cc7b5b53df40 (patch) | |
tree | ba97808ed9610304ef4d4d5adbc1bf0161d60542 /src/zoombar.cpp | |
parent | Merge commit 'refs/merge-requests/168' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-c265c4a38887b65243ec6c9537c9cc7b5b53df40.tar.xz |
Fixed focus regression.
As show slot calls setVisible(true) in QWidget code, we cannot override
show() AND setVisible(bool).
The best thing is IMHO inheriting show() && hide() slots
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(); } |