diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2010-06-14 23:01:24 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2010-06-14 23:01:24 +0200 | 
| commit | 606fbdf223d2cb86491040941dc17c972cab28ab (patch) | |
| tree | 43c15bf4c7c91de5785d467bafe97626864aa843 /src/urlbar | |
| parent | escape html in search item: prevent qlabel interpret html if the user type <h... (diff) | |
| download | rekonq-606fbdf223d2cb86491040941dc17c972cab28ab.tar.xz | |
Dark themes urlbar fix
Based on one patch from Tomas Fryda. Thanks.
Diffstat (limited to 'src/urlbar')
| -rw-r--r-- | src/urlbar/urlbar.cpp | 8 | 
1 files changed, 6 insertions, 2 deletions
| 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()) ); | 
