зеркало из https://github.com/nextcloud/desktop.git
Activities: Fix color when row is selected
This commit is contained in:
Родитель
95615eaca7
Коммит
9c9b9f3931
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче