diff options
Diffstat (limited to 'src/gui/kernel/qpaintdevicewindow.cpp')
-rw-r--r-- | src/gui/kernel/qpaintdevicewindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp index bc7ac89b03..8531aeed51 100644 --- a/src/gui/kernel/qpaintdevicewindow.cpp +++ b/src/gui/kernel/qpaintdevicewindow.cpp @@ -136,6 +136,11 @@ int QPaintDeviceWindow::metric(PaintDeviceMetric metric) const case PdmDevicePixelRatioScaled: return int(QWindow::devicePixelRatio() * devicePixelRatioFScale()); break; + case PdmDevicePixelRatioF_EncodedA: + Q_FALLTHROUGH(); + case PdmDevicePixelRatioF_EncodedB: + return QPaintDevice::encodeMetricF(metric, QWindow::devicePixelRatio()); + break; default: break; } @@ -171,6 +176,8 @@ bool QPaintDeviceWindow::event(QEvent *event) auto region = QRect(QPoint(0, 0), size()); d->doFlush(region); // Will end up calling paintEvent return true; + } else if (event->type() == QEvent::Resize) { + d->handleResizeEvent(); } return QWindow::event(event); |