Handle device pixel ratio in QHeaderView::setupSectionIndicator

The device pixel ratio was not applied to the section indicator pixmap
which made it look blurry on HighDPI screens.

Task-number: QTBUG-70084
Change-Id: I8b07b2ffc51781c2d2d89484b8618173f0692fe4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Christian Ehrlicher 2018-08-27 20:09:12 +02:00
parent 28702cb239
commit d18444fbff
1 changed files with 3 additions and 1 deletions

View File

@ -3369,7 +3369,9 @@ void QHeaderViewPrivate::setupSectionIndicator(int section, int position)
sectionIndicator->resize(w, h);
#endif
QPixmap pm(w, h);
const qreal pixmapDevicePixelRatio = q->devicePixelRatioF();
QPixmap pm(QSize(w, h) * pixmapDevicePixelRatio);
pm.setDevicePixelRatio(pixmapDevicePixelRatio);
pm.fill(QColor(0, 0, 0, 45));
QRect rect(0, 0, w, h);