center the icon vertically
BUG:163213 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816767
This commit is contained in:
parent
f1ce0ee124
commit
04f01a17dd
@ -215,7 +215,7 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem& option, cons
|
|||||||
Qt::AlignLeft : Qt::AlignRight,
|
Qt::AlignLeft : Qt::AlignRight,
|
||||||
option.decorationSize,
|
option.decorationSize,
|
||||||
contentRect.adjusted(Private::ITEM_LEFT_MARGIN,Private::ITEM_TOP_MARGIN,-Private::ITEM_RIGHT_MARGIN,-Private::ITEM_BOTTOM_MARGIN));
|
contentRect.adjusted(Private::ITEM_LEFT_MARGIN,Private::ITEM_TOP_MARGIN,-Private::ITEM_RIGHT_MARGIN,-Private::ITEM_BOTTOM_MARGIN));
|
||||||
|
decorationRect.moveTop(contentRect.top() + qMax(0, (contentRect.height() - decorationRect.height())) / 2);
|
||||||
|
|
||||||
QString titleText = index.data(Qt::DisplayRole).value<QString>();
|
QString titleText = index.data(Qt::DisplayRole).value<QString>();
|
||||||
QString subTitleText = index.data(d->roles[SubTitleRole]).value<QString>();
|
QString subTitleText = index.data(d->roles[SubTitleRole]).value<QString>();
|
||||||
|
Loading…
Reference in New Issue
Block a user