[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:15:24 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=de4d38c

The following commit has been merged in the master branch:
commit de4d38c734576cd6ea8e259bef60b29027ddd103
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Tue Jun 23 17:36:37 2015 +0200

    Use QPalette::ColorGroup from the option rather than always QPalette::Active
    
    When the window looses focus, the palette is no longer Active but
    Inactive. The option.palette has the correct data, so this just reuses
    it.
    
    BUG: 349523
    FIXED-IN: 15.04.3
---
 contact-delegate-compact.cpp | 4 ++--
 contact-delegate.cpp         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contact-delegate-compact.cpp b/contact-delegate-compact.cpp
index 2be03dd..1e35fe5 100644
--- a/contact-delegate-compact.cpp
+++ b/contact-delegate-compact.cpp
@@ -133,9 +133,9 @@ void ContactDelegateCompact::paintContact(QPainter *painter, const QStyleOptionV
     const QFontMetrics nameFontMetrics(nameFont);
 
     if (option.state & QStyle::State_Selected) {
-        painter->setPen(option.palette.color(QPalette::Active, QPalette::HighlightedText));
+        painter->setPen(option.palette.color(option.palette.currentColorGroup(), QPalette::HighlightedText));
     } else {
-        painter->setPen(option.palette.color(QPalette::Active, QPalette::Text));
+        painter->setPen(option.palette.color(option.palette.currentColorGroup(), QPalette::Text));
     }
 
     painter->setFont(nameFont);
diff --git a/contact-delegate.cpp b/contact-delegate.cpp
index e161283..dd08f76 100644
--- a/contact-delegate.cpp
+++ b/contact-delegate.cpp
@@ -137,9 +137,9 @@ void ContactDelegate::paintContact(QPainter *painter, const QStyleOptionViewItem
     const QFontMetrics nameFontMetrics(QFontDatabase::systemFont(QFontDatabase::GeneralFont));
 
     if (option.state & QStyle::State_Selected) {
-        painter->setPen(option.palette.color(QPalette::Active, QPalette::HighlightedText));
+        painter->setPen(option.palette.color(option.palette.currentColorGroup(), QPalette::HighlightedText));
     } else {
-        painter->setPen(option.palette.color(QPalette::Active, QPalette::Text));
+        painter->setPen(option.palette.color(option.palette.currentColorGroup(), QPalette::Text));
     }
 
     painter->drawText(userNameRect,

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list