diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-08 20:34:00 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-10 10:27:31 +0100 |
| commit | 883ca5d376d9cc7de17620d3b0444e201c683da0 (patch) | |
| tree | fdbd069b23f66f59f2cedfae0f54748a66b3bfe3 /src | |
| parent | 2606b10c7efdaa65e56ece77bad90bd55c154111 (diff) | |
Left-align warning icon if there is no update icon in the column version.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistversiondelegate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modlistversiondelegate.cpp b/src/modlistversiondelegate.cpp index f60edcf8..657718f5 100644 --- a/src/modlistversiondelegate.cpp +++ b/src/modlistversiondelegate.cpp @@ -41,8 +41,10 @@ void ModListVersionDelegate::paint(QPainter* painter, const QStyleOptionViewItem QSize pm = icon.actualSize(opt.decorationSize); pm.rwidth() += 2 * margin; opt.rect.setRect(opt.rect.x(), opt.rect.y(), pm.width(), opt.rect.height()); - drawDecoration(painter, opt, opt.rect, pixmap); + + // add margin for next icon (if any) + opt.rect.adjust(opt.decorationSize.width() + margin, 0, 0, 0); } if (downgrade) { @@ -51,7 +53,7 @@ void ModListVersionDelegate::paint(QPainter* painter, const QStyleOptionViewItem QSize pm = icon.actualSize(opt.decorationSize); pm.rwidth() += 2 * margin; - opt.rect.setRect(opt.rect.x() + opt.decorationSize.width() + margin, opt.rect.y(), pm.width(), opt.rect.height()); + opt.rect.setRect(opt.rect.x(), opt.rect.y(), pm.width(), opt.rect.height()); drawDecoration(painter, opt, opt.rect, pixmap); |
