summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlionelc <lionelc@lionelc.(none)>2010-08-11 16:46:16 +0200
committerlionelc <lionelc@lionelc.(none)>2010-08-11 16:46:16 +0200
commita835a88d397ae90a2d9d8a928da3784a531c44ce (patch)
tree88425a1e51f4e44dbb5fc067b41fb7e06544d26e
parentchange gradiant of the loading animation: fix aliasing (diff)
downloadrekonq-a835a88d397ae90a2d9d8a928da3784a531c44ce.tar.xz
loading animation color: fallback to the Highlight color if ToolTipBase color is quiet the same as Text color
-rw-r--r--src/urlbar/urlbar.cpp6
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);