diff options
author | lionelc <lionelc@lionelc.(none)> | 2010-08-11 16:46:16 +0200 |
---|---|---|
committer | lionelc <lionelc@lionelc.(none)> | 2010-08-11 16:46:16 +0200 |
commit | a835a88d397ae90a2d9d8a928da3784a531c44ce (patch) | |
tree | 88425a1e51f4e44dbb5fc067b41fb7e06544d26e /src/urlbar/urlbar.cpp | |
parent | change gradiant of the loading animation: fix aliasing (diff) | |
download | rekonq-a835a88d397ae90a2d9d8a928da3784a531c44ce.tar.xz |
loading animation color: fallback to the Highlight color if ToolTipBase color is quiet the same as Text color
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r-- | src/urlbar/urlbar.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index bc43957a..c5b89516 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -186,7 +186,11 @@ void UrlBar::paintEvent(QPaintEvent *event) else { QColor loadingColor = Application::palette().color(QPalette::ToolTipBase); - + if (abs(loadingColor.lightness() - foregroundColor.lightness()) < 50) + { + loadingColor = Application::palette().color(QPalette::Highlight); + } + QLinearGradient gradient( QPoint(0, 0), QPoint(width(), 0) ); gradient.setColorAt(0, loadingColor); gradient.setColorAt(((double)progr) / 100 - .000001, loadingColor); |