Avoid rubberband artifacts under fractional DPR scaling
Expand the rubberband repaint area with one pixel to account for rounding on screens with fractional device pixel ratio. Fixes: QTBUG-102717 Pick-to: 6.3 6.2 Change-Id: Iede638d48dfbc3156b02ada28dfe99719b9d5efa Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
c9f4cb2c92
commit
5020d1b22a
@ -732,7 +732,7 @@ QRegion QGraphicsViewPrivate::rubberBandRegion(const QWidget *widget, const QRec
|
||||
option.shape = QRubberBand::Rectangle;
|
||||
|
||||
QRegion tmp;
|
||||
tmp += rect;
|
||||
tmp += rect.adjusted(-1, -1, 1, 1);
|
||||
if (widget->style()->styleHint(QStyle::SH_RubberBand_Mask, &option, widget, &mask))
|
||||
tmp &= mask.region;
|
||||
return tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user