summaryrefslogtreecommitdiff
path: root/src/zoombar.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-08-10 11:43:09 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-08-10 11:43:09 +0200
commit1c38aae39d5ec6ee6b422b7f9c0ac54478de88d2 (patch)
treee89687025bd77eb5bed24c1556cbed4cdd91c7d7 /src/zoombar.cpp
parent- Fix Ctrl + wheel shortcut (diff)
downloadrekonq-1c38aae39d5ec6ee6b422b7f9c0ac54478de88d2.tar.xz
- Checkable action for the zoom and find bars
Diffstat (limited to 'src/zoombar.cpp')
-rw-r--r--src/zoombar.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/zoombar.cpp b/src/zoombar.cpp
index 1b52ae7b..c85e607a 100644
--- a/src/zoombar.cpp
+++ b/src/zoombar.cpp
@@ -100,7 +100,7 @@ void ZoomBar::setupActions(MainWindow *window)
a = window->actionCollection()->addAction(KStandardAction::ZoomOut, this, SLOT(zoomOut()));
a = window->actionCollection()->addAction(KStandardAction::ActualSize, this, SLOT(zoomNormal()));
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_0));
- a = window->actionCollection()->addAction(KStandardAction::Zoom, this, SLOT(show()));
+ a = window->actionCollection()->addAction(KStandardAction::Zoom, this, SLOT(toggleVisibility()));
a->setIcon(KIcon("page-zoom"));
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Y));
@@ -165,3 +165,16 @@ void ZoomBar::setValue(int value)
m_zoomSlider->setValue(value);
Application::instance()->mainWindow()->currentTab()->view()->setZoomFactor(QVariant(m_zoomSlider->value()).toReal() / 10); // Don't allox max +1 values
}
+
+
+void ZoomBar::setVisible(bool visible)
+{
+ emit visibilityChanged(visible);
+ QWidget::setVisible(visible);
+}
+
+
+void ZoomBar::toggleVisibility()
+{
+ setVisible(!isVisible());
+}