diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-09 23:51:33 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-10 11:37:31 +0200 |
commit | e55e9c541f7a700de529b521552cc935619cc894 (patch) | |
tree | 9664e74302dfeec8074eaa28b754a806d0b68fb1 /src | |
parent | remove useless #includes (diff) | |
download | rekonq-e55e9c541f7a700de529b521552cc935619cc894.tar.xz |
- Fix Ctrl + wheel shortcut
- Fix zoomUp at the end of the bar
- add a stretch on the right
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 3 | ||||
-rw-r--r-- | src/webview.cpp | 2 | ||||
-rw-r--r-- | src/webview.h | 2 | ||||
-rw-r--r-- | src/zoombar.cpp | 10 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 01dd2ad2..4d6883ef 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -255,6 +255,7 @@ void MainWindow::postLaunch() // Zoom Bar signal connect(m_view, SIGNAL(currentChanged(int)), m_zoomBar, SLOT(updateSlider(int))); + connect(this->currentTab()->view(), SIGNAL(zoomChanged(int)), m_zoomBar, SLOT(setValue(int))); // Ctrl + wheel handling // setting up toolbars to NOT have context menu enabled setContextMenuPolicy(Qt::DefaultContextMenu); @@ -1334,4 +1335,4 @@ bool MainWindow::queryClose() } } return true; -}
\ No newline at end of file +} diff --git a/src/webview.cpp b/src/webview.cpp index 188216f8..a1b39805 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -543,7 +543,7 @@ void WebView::wheelEvent(QWheelEvent *event) if ((zoomFactor() * 10 - newFactor) > 0.5) newFactor++; - emit zoomChanged((qreal)newFactor / 10); + emit zoomChanged(newFactor); } } diff --git a/src/webview.h b/src/webview.h index a4ba676c..1fd40f92 100644 --- a/src/webview.h +++ b/src/webview.h @@ -74,7 +74,7 @@ private slots: signals: void loadUrl(const KUrl &, const Rekonq::OpenType &); - void zoomChanged(qreal); + void zoomChanged(int); private: QPoint _mousePos; diff --git a/src/zoombar.cpp b/src/zoombar.cpp index d44553ed..1b52ae7b 100644 --- a/src/zoombar.cpp +++ b/src/zoombar.cpp @@ -64,7 +64,7 @@ ZoomBar::ZoomBar(QWidget *parent) layout->setAlignment(hideButton, Qt::AlignLeft | Qt::AlignTop); // label - QLabel *label = new QLabel(i18n("Zoom:")); + QLabel *label = new QLabel(i18n("Zoom :")); layout->addWidget(label); m_zoomSlider->setTracking(true); @@ -77,13 +77,15 @@ ZoomBar::ZoomBar(QWidget *parent) m_zoomOut->setAutoRaise(true); m_zoomNormal->setAutoRaise(true); - layout->setSpacing(0); - layout->setMargin(0); + // layout->setSpacing(0); + // layout->setMargin(0); layout->addWidget(m_zoomOut); layout->addWidget(m_zoomSlider); layout->addWidget(m_zoomIn); layout->addWidget(m_zoomNormal); + layout->addStretch(); + setLayout(layout); // we start off hidden @@ -161,5 +163,5 @@ void ZoomBar::updateSlider(int webview) void ZoomBar::setValue(int value) { m_zoomSlider->setValue(value); - Application::instance()->mainWindow()->currentTab()->view()->setZoomFactor(QVariant(value).toReal() / 10); + Application::instance()->mainWindow()->currentTab()->view()->setZoomFactor(QVariant(m_zoomSlider->value()).toReal() / 10); // Don't allox max +1 values } |