[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:12:58 UTC 2016


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

The following commit has been merged in the master branch:
commit cefc854660d65c24d0b36a7cbfcacf1a20df6b15
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Wed Mar 13 18:44:15 2013 +0100

    Don't paint (0/0) counts in accounts header
    
    This usually happens when the account is offline,
    but can be the case for Salut when nobody is on the network.
    
    Still, showing (0/0) is useless.
    
    Reviewed-by: David Edmundson
---
 abstract-contact-delegate.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/abstract-contact-delegate.cpp b/abstract-contact-delegate.cpp
index 55e4b03..95c9007 100644
--- a/abstract-contact-delegate.cpp
+++ b/abstract-contact-delegate.cpp
@@ -143,8 +143,11 @@ void AbstractContactDelegate::paintHeader(QPainter *painter, const QStyleOptionV
     QFontMetrics groupFontMetrics(groupFont);
 
     painter->setFont(groupFont);
-    painter->setPen(option.palette.color(QPalette::Disabled, QPalette::Text));
-    painter->drawText(groupLabelRect, Qt::AlignVCenter | Qt::AlignRight, countsString);
+    if (index.data(KTp::HeaderTotalUsersRole).toInt() > 0) {
+        painter->setPen(option.palette.color(QPalette::Disabled, QPalette::Text));
+        painter->drawText(groupLabelRect, Qt::AlignVCenter | Qt::AlignRight, countsString);
+    }
+
     painter->setPen(option.palette.color(QPalette::Active, QPalette::Text));
     painter->drawText(groupLabelRect, Qt::AlignVCenter | Qt::AlignLeft,
                       groupFontMetrics.elidedText(groupHeaderString, Qt::ElideRight,

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list