Paste P263

Masterwork From Distant Lands
ActivePublic

Authored by davidedmundson on Oct 4 2018, 6:26 PM.
diff --git a/libs/ui/opengl/kis_opengl_canvas2.cpp b/libs/ui/opengl/kis_opengl_canvas2.cpp
index 076b4955e8..39d940d31e 100644
--- a/libs/ui/opengl/kis_opengl_canvas2.cpp
+++ b/libs/ui/opengl/kis_opengl_canvas2.cpp
@@ -43,6 +43,7 @@
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
#include <QMessageBox>
+#include <QGuiApplication>
#ifndef Q_OS_OSX
#include <QOpenGLFunctions_2_1>
@@ -658,7 +659,7 @@ void KisOpenGLCanvas2::drawImage()
qreal scaleX, scaleY;
converter->imageScale(&scaleX, &scaleY);
- d->displayShader->setUniformValue(d->displayShader->location(Uniform::ViewportScale), (GLfloat) scaleX);
+ d->displayShader->setUniformValue(d->displayShader->location(Uniform::ViewportScale), (GLfloat) (scaleX * devicePixelRatioF()));
d->displayShader->setUniformValue(d->displayShader->location(Uniform::TexelSize), (GLfloat) d->openGLImageTextures->texelSize());
QRect ir = d->openGLImageTextures->storedImageBounds();
davidedmundson edited the content of this paste. (Show Details)Oct 4 2018, 6:26 PM
davidedmundson changed the title of this paste from untitled to Masterwork From Distant Lands.