diff options
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r-- | src/urlbar/urlbar.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 6ec461a2..b46eccdb 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -91,7 +91,7 @@ UrlBar::UrlBar(QWidget *parent) setUrlDropsEnabled(true); // tooltip - setToolTip(i18n("Type here to search your bookmarks, history and the web..")); + setToolTip(i18n("Type here to search your bookmarks, history and the web...")); // accept focus, via tabbing, clicking & wheeling setFocusPolicy(Qt::WheelFocus); @@ -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); } @@ -198,7 +203,7 @@ void UrlBar::paintEvent(QPaintEvent *event) painter.setPen(Qt::gray); painter.drawText(textRect, Qt::AlignVCenter | Qt::AlignCenter, - i18n("Type here to search your bookmarks, history and the web..") + i18n("Type here to search your bookmarks, history and the web...") ); } } |