diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-05 15:12:57 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-07 11:19:04 +0000 |
commit | c6b3f4b28200a2f1a4af70cc30af91b74a6df64b (patch) | |
tree | be94d596804ac5e99c11efc6df3dbaa884a49ec6 /src/gui/painting | |
parent | a14a943f9ac3d1e85514d7fb6688c84e624ac850 (diff) |
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>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 09c23fdfa1..cc8d850689 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -344,7 +344,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i 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); |