[Pkg-owncloud-commits] [owncloud-client] 98/171: Activities: Fix color when row is selected
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Feb 17 09:36:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.
commit 9c9b9f3931f3adb6d98f38d9d4b9b3fde89c18e3
Author: Markus Goetz <markus at woboq.com>
Date: Mon Jan 11 16:52:05 2016 +0100
Activities: Fix color when row is selected
---
src/gui/activityitemdelegate.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gui/activityitemdelegate.cpp b/src/gui/activityitemdelegate.cpp
index 2d86ba9..e625b97 100644
--- a/src/gui/activityitemdelegate.cpp
+++ b/src/gui/activityitemdelegate.cpp
@@ -122,6 +122,16 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
pm = userIcon.pixmap(iconWidth, iconHeight, QIcon::Normal);
painter->drawPixmap(QPoint(userIconRect.left(), userIconRect.top()), pm);
+ QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
+ ? QPalette::Normal : QPalette::Disabled;
+ if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
+ cg = QPalette::Inactive;
+ if (option.state & QStyle::State_Selected) {
+ painter->setPen(option.palette.color(cg, QPalette::HighlightedText));
+ } else {
+ painter->setPen(option.palette.color(cg, QPalette::Text));
+ }
+
const QString elidedAction = fm.elidedText(actionText, Qt::ElideRight, actionTextBox.width());
painter->drawText(actionTextBox, elidedAction);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list