From f6a5f00b1e7201304f417c580819a545fb5fd192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 18 Apr 2012 14:45:12 +0000 Subject: [PATCH] changed labels to buttons; shall I really spend my time on this tosh instead of solving real functional problems?; refs #128 --- src/browser.hxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/browser.hxx b/src/browser.hxx index 0af65c7..a5bf4c3 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -98,11 +98,14 @@ class Browser: public QMainWindow, protected Ui::Browser { _find->hide(); statusBar()->addPermanentWidget(_progress = new QProgressBar()); _progress -> setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + QPushButton* btn(0); statusBar()->addPermanentWidget - (new QLabel("")); + (btn=new QPushButton(QIcon(":/icons/16x16/butt16_09.png"), "")); + assert(connect(btn, SIGNAL(clicked(bool)), SLOT(smaller()))); statusBar()->addPermanentWidget(_zoom = new QSlider(Qt::Horizontal)); statusBar()->addPermanentWidget - (new QLabel("")); + (btn=new QPushButton(QIcon(":/icons/16x16/butt16_10.png"), "")); + assert(connect(btn, SIGNAL(clicked(bool)), SLOT(larger()))); _zoom->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); _zoom->setMinimum(10); _zoom->setMaximum(190); @@ -610,6 +613,14 @@ class Browser: public QMainWindow, protected Ui::Browser { } } + void smaller() { + _zoom->setValue(_zoom->value()-_zoom->pageStep()); + } + + void larger() { + _zoom->setValue(_zoom->value()+_zoom->pageStep()); + } + void zoom(int i) { LOG<showMessage(tr("Zoom: %1%").arg(i));