summaryrefslogtreecommitdiff
path: root/src/findbar.cpp
diff options
context:
space:
mode:
authorFelix Rohrbach <fxrh@gmx.de>2011-03-21 22:51:24 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-03-21 22:51:24 +0100
commitf843422c46a9efa5d3f50d4cdb99a5e4ee71769f (patch)
treecf17526796e173b859b8ff2a8c76d9160c527d55 /src/findbar.cpp
parentMerge branch 'master' of git.kde.org:rekonq (diff)
downloadrekonq-f843422c46a9efa5d3f50d4cdb99a5e4ee71769f.tar.xz
Better color integration for the urlbar and the findbar
BUG:256535
Diffstat (limited to 'src/findbar.cpp')
-rw-r--r--src/findbar.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/findbar.cpp b/src/findbar.cpp
index ebb6e641..8272a2d3 100644
--- a/src/findbar.cpp
+++ b/src/findbar.cpp
@@ -40,6 +40,7 @@
#include <KLineEdit>
#include <KLocalizedString>
#include <KPushButton>
+#include <KColorScheme>
// Qt Includes
#include <QtCore/QTimer>
@@ -189,20 +190,21 @@ void FindBar::setVisible(bool visible)
void FindBar::notifyMatch(bool match)
{
QPalette p = m_lineEdit->palette();
+ KColorScheme colorScheme(p.currentColorGroup());
if (m_lineEdit->text().isEmpty())
{
- p.setColor(QPalette::Base, QColor(KApplication::palette().color(QPalette::Active, QPalette::Base)));
+ p.setColor(QPalette::Base, colorScheme.background(KColorScheme::NormalBackground).color());
}
else
{
if (match)
{
- p.setColor(QPalette::Base, QColor(186, 249, 206));
+ p.setColor(QPalette::Base, colorScheme.background(KColorScheme::PositiveBackground).color());
}
else
{
- p.setColor(QPalette::Base, QColor(247, 130, 130)); // previous were 247, 230, 230
+ p.setColor(QPalette::Base, colorScheme.background(KColorScheme::NegativeBackground).color()); // previous were 247, 230, 230
}
}
m_lineEdit->setPalette(p);