Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
[win][qt6] Fix transparent canvas widget issue
Dmitry Kazakov4e44f0958ebe
diff --git a/libs/ui/opengl/KisOpenGLCanvasRenderer.cpp b/libs/ui/opengl/KisOpenGLCanvasRenderer.cppindex dc202b1ae0..e520934e0c 100644--- a/libs/ui/opengl/KisOpenGLCanvasRenderer.cpp+++ b/libs/ui/opengl/KisOpenGLCanvasRenderer.cpp@@ -420,7 +420,7 @@ void KisOpenGLCanvasRenderer::paintToolOutline(const KisOptimizedBrushOutline &pQVector4D(d->cursorColor.redF(), d->cursorColor.greenF(), d->cursorColor.blueF(), 1.0f));glEnable(GL_BLEND);- glBlendFuncSeparate(GL_ONE, GL_SRC_COLOR, GL_ONE, GL_ONE);+ glBlendFuncSeparate(GL_ONE, GL_SRC_COLOR, GL_ZERO, GL_ONE);glBlendEquationSeparate(GL_FUNC_SUBTRACT, GL_FUNC_ADD);@@ -720,7 +720,7 @@ void KisOpenGLCanvasRenderer::drawGrid(const QRect &updateRect)d->solidColorShader->setUniformValue(d->solidColorShader->location(Uniform::ModelViewProjection), modelMatrix);glEnable(GL_BLEND);- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);+ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE);d->solidColorShader->setUniformValue(d->solidColorShader->location(Uniform::FragmentColor),@@ -780,7 +780,7 @@ void KisOpenGLCanvasRenderer::drawImage(const QRect &updateRect)}glEnable(GL_BLEND);- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);+ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE);KisCoordinatesConverter *converter = coordinatesConverter();