Skip to content

Commit

Permalink
Fix black border around main widget with non-integer scaling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Sandfeld Jensen committed Jun 7, 2018
1 parent a14a943 commit c6b3f4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/painting/qplatformbackingstore.cpp
Expand Up @@ -344,7 +344,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
QWindowPrivate::get(window)->lastComposeTime.start();

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->glClear(GL_COLOR_BUFFER_BIT);

Expand Down

0 comments on commit c6b3f4b

Please sign in to comment.