changed labels to buttons; shall I really spend my time on this tosh instead of solving real functional problems?; refs #128

master
Marc Wäckerlin 13 years ago
parent 55f151266f
commit f6a5f00b1e
  1. 15
      src/browser.hxx

@ -98,11 +98,14 @@ class Browser: public QMainWindow, protected Ui::Browser {
_find->hide(); _find->hide();
statusBar()->addPermanentWidget(_progress = new QProgressBar()); statusBar()->addPermanentWidget(_progress = new QProgressBar());
_progress -> setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); _progress -> setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
QPushButton* btn(0);
statusBar()->addPermanentWidget statusBar()->addPermanentWidget
(new QLabel("<img src=\":/icons/16x16/butt16_09.png\"/>")); (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(_zoom = new QSlider(Qt::Horizontal));
statusBar()->addPermanentWidget statusBar()->addPermanentWidget
(new QLabel("<img src=\":/icons/16x16/butt16_10.png\"/>")); (btn=new QPushButton(QIcon(":/icons/16x16/butt16_10.png"), ""));
assert(connect(btn, SIGNAL(clicked(bool)), SLOT(larger())));
_zoom->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); _zoom->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
_zoom->setMinimum(10); _zoom->setMinimum(10);
_zoom->setMaximum(190); _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) { void zoom(int i) {
LOG<<i; LOG<<i;
statusBar()->showMessage(tr("Zoom: %1%").arg(i)); statusBar()->showMessage(tr("Zoom: %1%").arg(i));

Loading…
Cancel
Save