diff --git a/src/settingslistdelegate.cpp b/src/settingslistdelegate.cpp index 032fe6d4f..43db82218 100644 --- a/src/settingslistdelegate.cpp +++ b/src/settingslistdelegate.cpp @@ -44,9 +44,11 @@ void SettingsListDelegate::paint(QPainter *painter, const QStyleOptionViewItem & } #endif - QRect iconRect = option.rect.adjusted( 23, 6, -option.rect.width() + option.decorationSize.width() + 7, -option.rect.height() + option.decorationSize.height() + 2 - 12 ); + + int horizontalOffset = ( option.rect.width() - option.decorationSize.width() ) /2; + QRect iconRect = option.rect.adjusted( horizontalOffset, 6, -horizontalOffset, -option.rect.height() + 6 + option.decorationSize.height() ); QPixmap avatar = index.data( Qt::DecorationRole ).value().pixmap( iconRect.size() ); - painter->drawPixmap( iconRect, avatar.scaledToHeight( iconRect.height(), Qt::SmoothTransformation ) ); + painter->drawPixmap( iconRect, avatar ); QRect textRect = option.rect.adjusted( 6, iconRect.height() + 8, -6, 0 ); QString text = painter->fontMetrics().elidedText( index.data( Qt::DisplayRole ).toString(), Qt::ElideRight, textRect.width() ); diff --git a/src/stackedsettingsdialog.ui b/src/stackedsettingsdialog.ui index e116e38c9..961b3d6b1 100644 --- a/src/stackedsettingsdialog.ui +++ b/src/stackedsettingsdialog.ui @@ -58,8 +58,8 @@ - 48 - 48 + 32 + 32