[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:54 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=5f2c13a
The following commit has been merged in the master branch:
commit 5f2c13a822f1a86ee3635dbe5e98d83a496088b9
Author: Michal Zajačík <michal at zajacik.eu>
Date: Mon Mar 11 17:24:20 2013 +0100
Add opacity to account icons in the delegate
Reviewed-by: Martin Klapetek
BUG: 315541
---
abstract-contact-delegate.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/abstract-contact-delegate.cpp b/abstract-contact-delegate.cpp
index 3c0b43e..55e4b03 100644
--- a/abstract-contact-delegate.cpp
+++ b/abstract-contact-delegate.cpp
@@ -36,6 +36,7 @@
const int SPACING = 4;
const int ACCOUNT_ICON_SIZE = 22;
+const qreal GROUP_ICON_OPACITY = 0.6;
AbstractContactDelegate::AbstractContactDelegate(QObject *parent)
: QStyledItemDelegate(parent)
@@ -124,7 +125,10 @@ void AbstractContactDelegate::paintHeader(QPainter *painter, const QStyleOptionV
groupIconRect.moveTop(groupRect.top() + groupRect.height()/2 - groupIconRect.height()/2);
if (index.data(KTp::RowTypeRole).toInt() == KTp::AccountRowType) {
+ //draw the icon with some opacity
+ painter->setOpacity(GROUP_ICON_OPACITY);
painter->drawPixmap(groupIconRect, KIcon(index.data(Qt::DecorationRole).value<QIcon>()).pixmap(ACCOUNT_ICON_SIZE));
+ painter->setOpacity(1.0);
} else {
groupIconRect.setWidth(0);
}
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list