diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Messages.sh | 3 | ||||
-rw-r--r-- | src/data/rekonq.desktop | 1 | ||||
-rw-r--r-- | src/mainview.cpp | 1 | ||||
-rw-r--r-- | src/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow.h | 4 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 11 | ||||
-rw-r--r-- | src/webtab.cpp | 1 | ||||
-rw-r--r-- | src/webtab.h | 3 | ||||
-rw-r--r-- | src/webview.cpp | 17 | ||||
-rw-r--r-- | src/webview.h | 2 |
11 files changed, 40 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d78d696..0a4ec887 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.4.90" ) +SET(REKONQ_VERSION "0.4.91" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) diff --git a/src/Messages.sh b/src/Messages.sh index efa6adff..86f846c8 100644 --- a/src/Messages.sh +++ b/src/Messages.sh @@ -1,2 +1,5 @@ #! /bin/sh +$EXTRACTRC *.ui */*ui >> rc.cpp || exit 1 $XGETTEXT *.cpp */*.cpp -o $podir/rekonq.pot +rm -f rc.cpp + diff --git a/src/data/rekonq.desktop b/src/data/rekonq.desktop index 028a79cb..e4157082 100644 --- a/src/data/rekonq.desktop +++ b/src/data/rekonq.desktop @@ -24,6 +24,7 @@ Name[zh_TW]=rekonq GenericName=WebKit KDE Browser GenericName[da]=KDE-browser baseret på WebKit GenericName[de]=WebKit-basierter Webbrowser für KDE +GenericName[en_GB]=WebKit KDE Browser GenericName[et]=KDE WebKiti veebibrauser GenericName[fr]=Navigateur Webkit pour KDE GenericName[nl]=Webkit KDE Browser diff --git a/src/mainview.cpp b/src/mainview.cpp index 84dc70af..0b17ef2a 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -329,6 +329,7 @@ WebTab *MainView::newWebTab(bool focused, bool nearParent) connect(tab->view(), SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); connect(tab->view(), SIGNAL(titleChanged(const QString &)), this, SLOT(webViewTitleChanged(const QString &))); connect(tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(webViewUrlChanged(const QUrl &))); + connect(tab->view(), SIGNAL(zoomChanged(qreal)), m_parentWindow, SLOT(setZoomSliderFactor(qreal))); // connecting webPage signals with mainview connect(tab->view()->page(), SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested())); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d5b81c1e..dc29d2eb 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -906,7 +906,7 @@ void MainWindow::setZoomFactor(int factor) void MainWindow::setZoomSliderFactor(qreal factor) { - m_zoomSlider->setValue(factor*10); + m_zoomSlider->setValue(factor * 10); } diff --git a/src/mainwindow.h b/src/mainwindow.h index ffc91086..8acbef56 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -78,8 +78,6 @@ public: virtual QSize sizeHint() const; void setWidgetsVisible(bool makeFullScreen); - void setZoomSliderFactor(qreal factor); - private: void setupActions(); void setupTools(); @@ -103,6 +101,8 @@ public slots: void updateActions(); + void setZoomSliderFactor(qreal factor); + signals: // switching tabs void ctrlTabPressed(); diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 4d38f170..5428ca33 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -101,6 +101,8 @@ UrlBar::UrlBar(QWidget *parent) _tab = qobject_cast<WebTab *>(parent); + connect(_tab, SIGNAL(loadProgressing()), this, SLOT(update())); + connect(_tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(setQUrl(const QUrl &))); connect(_tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons())); @@ -152,7 +154,7 @@ void UrlBar::activated(const KUrl& url, Rekonq::OpenType type) void UrlBar::paintEvent(QPaintEvent *event) -{ +{ QColor backgroundColor; if (_privateMode) { @@ -177,10 +179,13 @@ void UrlBar::paintEvent(QPaintEvent *event) } else { - QColor loadingColor = QColor(116, 192, 250); + // NOTE: I chose this instead of the old QColor(116, 192, 250) + // to try respecting style colors + QColor loadingColor = Application::palette().color(QPalette::ToolTipBase); - QLinearGradient gradient(0, 0, width(), 0); + QLinearGradient gradient( QPoint(0, 0), QPoint(width(), height()) ); gradient.setColorAt(0, loadingColor); + gradient.setColorAt(((double)progr) / 100 - .000001, loadingColor); gradient.setColorAt(((double)progr) / 100, backgroundColor); p.setBrush(QPalette::Base, gradient); } diff --git a/src/webtab.cpp b/src/webtab.cpp index 47780a44..9e168d36 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -124,6 +124,7 @@ KUrl WebTab::url() void WebTab::updateProgress(int p) { m_progress = p; + emit loadProgressing(); } diff --git a/src/webtab.h b/src/webtab.h index bc07a3e9..e34bbccf 100644 --- a/src/webtab.h +++ b/src/webtab.h @@ -67,6 +67,9 @@ private slots: void createWalletBar(const QString &, const QUrl &); void showRSSInfo(QPoint pos); +signals: + void loadProgressing(); + private: WebView *_view; diff --git a/src/webview.cpp b/src/webview.cpp index a26cf63f..061dd256 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -496,6 +496,23 @@ void WebView::keyPressEvent(QKeyEvent *event) KWebView::keyPressEvent(event); } +void WebView::wheelEvent(QWheelEvent *event) +{ + // Sync with the zoom slider + if (event->modifiers() == Qt::ControlModifier) + { + emit zoomChanged(zoomFactor()); + } + + KWebView::wheelEvent(event); + + // Limits of the slider + if (zoomFactor() > 1.9) + setZoomFactor(1.9); + else if (zoomFactor() < 0.1) + setZoomFactor(0.1); +} + void WebView::inspect() { diff --git a/src/webview.h b/src/webview.h index bac12e99..a4ba676c 100644 --- a/src/webview.h +++ b/src/webview.h @@ -56,6 +56,7 @@ protected: void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void keyPressEvent(QKeyEvent *event); + void wheelEvent(QWheelEvent *event); private slots: void search(); @@ -73,6 +74,7 @@ private slots: signals: void loadUrl(const KUrl &, const Rekonq::OpenType &); + void zoomChanged(qreal); private: QPoint _mousePos; |