diff --git a/dgl/src/OpenGL.cpp b/dgl/src/OpenGL.cpp index df91b34b..8cc6d889 100644 --- a/dgl/src/OpenGL.cpp +++ b/dgl/src/OpenGL.cpp @@ -598,7 +598,10 @@ void SubWidget::PrivateData::display(const uint width, const uint height, const else if (needsFullViewportForDrawing || (absolutePos.isZero() && self->getSize() == Size(width, height))) { // full viewport size - glViewport(0, 0, static_cast(width), static_cast(height)); + glViewport(0, + -static_cast(height * autoScaleFactor - height + 0.5), + static_cast(width * autoScaleFactor + 0.5), + static_cast(height * autoScaleFactor + 0.5)); } else {