diff options
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/listitem.cpp | 4 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index 97cd5cd8..037afb06 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -53,7 +53,7 @@ #include <QMouseEvent> #include <QWebSettings> #include <QFile> - +#include <QTextDocument> ListItem::ListItem(const UrlSearchItem &item, QWidget *parent) : QWidget(parent) @@ -299,7 +299,7 @@ SearchListItem::SearchListItem(const UrlSearchItem &item, const QString &text, Q QString SearchListItem::searchItemTitle(QString engine, QString text) { - return QString(i18nc("%1=search engine, e.g. Google, Wikipedia %2=text to search for", "Search %1 for <b>%2</b>", engine, text)); + return QString(i18nc("%1=search engine, e.g. Google, Wikipedia %2=text to search for", "Search %1 for <b>%2</b>", engine, Qt::escape(text))); } diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 33515de6..5c3cba28 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -156,13 +156,17 @@ void UrlBar::activated(const KUrl& url, Rekonq::OpenType type) void UrlBar::paintEvent(QPaintEvent *event) { QColor backgroundColor; + QColor foregroundColor; + if (_privateMode) { backgroundColor = QColor(220, 220, 220); // light gray + foregroundColor = Qt::black; } else { backgroundColor = Application::palette().color(QPalette::Base); + foregroundColor = Application::palette().color(QPalette::Text); } // set background color of UrlBar @@ -174,13 +178,13 @@ void UrlBar::paintEvent(QPaintEvent *event) if (_tab->url().scheme() == QL1S("https")) { backgroundColor = QColor(255, 255, 171); // light yellow + foregroundColor = Qt::black; } p.setBrush(QPalette::Base, backgroundColor); + p.setBrush(QPalette::Text, foregroundColor); } else { - // 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( QPoint(0, 0), QPoint(width(), height()) ); |