Fix black border around main widget with non-integer scaling
All the other highdpi scaling uses rounding, and not using it here may offset the compositing by a line. Task-number: QTBUG-67994 Change-Id: I2f5f328c091d0e85c40b1663e22c82f364df65e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
a14a943f9a
commit
c6b3f4b282
@ -344,7 +344,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i
|
|||||||
QWindowPrivate::get(window)->lastComposeTime.start();
|
QWindowPrivate::get(window)->lastComposeTime.start();
|
||||||
|
|
||||||
QOpenGLFunctions *funcs = d_ptr->context->functions();
|
QOpenGLFunctions *funcs = d_ptr->context->functions();
|
||||||
funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio());
|
funcs->glViewport(0, 0, qRound(window->width() * window->devicePixelRatio()), qRound(window->height() * window->devicePixelRatio()));
|
||||||
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);
|
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);
|
||||||
funcs->glClear(GL_COLOR_BUFFER_BIT);
|
funcs->glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user