Skip to content

Commit

Permalink
Fix rounding error when centering LCD paint rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Sep 4, 2024
1 parent 846fa83 commit 4df4cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/qt/lcdwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void LCDWidget::paintEvent(QPaintEvent*) {
forceBilinear = false;
}
QRectF target = QRectF(QPointF(), targetSize);
target.moveCenter(cw.center());
target.moveCenter(QRectF(cw).center());
QSize integerSize = QSize(qMax(qRound(widthScale), 1) * LCD_WIDTH, qMax(qRound(heightScale), 1) * LCD_HEIGHT);
bool sharpUsesBilinear = m_upscale == SharpBilinear && integerSize != pixelSize;
c.setRenderHint(QPainter::SmoothPixmapTransform, forceBilinear || sharpUsesBilinear);
Expand Down

0 comments on commit 4df4cba

Please sign in to comment.