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


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

The following commit has been merged in the master branch:
commit a49db847cb4db63782e8ae34f23acacd078af6cd
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Mon Jul 16 14:48:47 2012 +0200

    Fix contact overlay buttons not hiding the presence message when showing up
    
    Reviewed-by: David Edmundson
---
 contact-delegate.cpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/contact-delegate.cpp b/contact-delegate.cpp
index f468bec..f79b1d5 100644
--- a/contact-delegate.cpp
+++ b/contact-delegate.cpp
@@ -138,7 +138,7 @@ void ContactDelegate::paintContact(QPainter *painter, const QStyleOptionViewItem
     } else {
         painter->setPen(m_palette->color(QPalette::Active, QPalette::WindowText));
     }
-    
+
     painter->drawText(userNameRect,
                       nameFontMetrics.elidedText(optV4.text, Qt::ElideRight, userNameRect.width()));
 
@@ -149,19 +149,20 @@ void ContactDelegate::paintContact(QPainter *painter, const QStyleOptionViewItem
     statusMsgRect.setY(userNameRect.bottom() - statusFontMetrics.height() - 4);
     statusMsgRect.setWidth(statusMsgRect.width() - rightIconsWidth);
 
-    QColor fadingColor(m_palette->color(QPalette::Disabled, QPalette::Text));
+    QColor fadingColor;
+    if (option.state & QStyle::State_HasFocus) {
+        fadingColor = QColor(m_palette->color(QPalette::Disabled, QPalette::HighlightedText));
+    } else {
+        fadingColor = QColor(m_palette->color(QPalette::Disabled, QPalette::WindowText));
+    }
 
     // if the index is hovered, set animated alpha to the color
     if (index == m_indexForHiding) {
         fadingColor.setAlpha(m_fadingValue);
     }
 
-    if (option.state & QStyle::State_HasFocus) {
-        painter->setPen(m_palette->color(QPalette::Disabled, QPalette::HighlightedText));
-    } else {
-        painter->setPen(m_palette->color(QPalette::Disabled, QPalette::WindowText));
-    }
-    
+    painter->setPen(fadingColor);
+
     painter->setFont(KGlobalSettings::smallestReadableFont());
     painter->drawText(statusMsgRect,
                       statusFontMetrics.elidedText(presence.statusMessage().simplified(),

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list