Merge pull request #12921 from VampireFlower/master

BreakpointWidget: Correct icon position
This commit is contained in:
Admiral H. Curtiss 2024-07-10 03:25:49 +02:00 committed by GitHub
commit 321c4649a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ private:
if (!pix.isNull())
{
const QRect r = option.rect;
const QPoint p = QPoint((r.width() - pix.width()) / 2, (r.height() - pix.height()) / 2);
const QSize size = pix.deviceIndependentSize().toSize();
const QPoint p = QPoint((r.width() - size.width()) / 2, (r.height() - size.height()) / 2);
painter->drawPixmap(r.topLeft() + p, pix);
}
}