From 96d968ef6756d998ab527332ecd3b04b30ab319a Mon Sep 17 00:00:00 2001 From: mara004 <65915611+mara004@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:59:23 +0200 Subject: [PATCH 1/3] Fix OpenGL rendering on Wayland Move away from the deprecated QGLWidget involving problematic native widgets. Use the newer QOpenGLWidget instead. --- src/core/ImageViewBase.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/ImageViewBase.cpp b/src/core/ImageViewBase.cpp index dc8a3e785..abaee12cf 100644 --- a/src/core/ImageViewBase.cpp +++ b/src/core/ImageViewBase.cpp @@ -7,7 +7,8 @@ #include #include -#include +// #include +#include #include #include #include @@ -149,17 +150,17 @@ ImageViewBase::ImageViewBase(const QImage& image, if (ApplicationSettings::getInstance().isOpenGlEnabled()) { if (OpenGLSupport::supported()) { - QGLFormat format; - format.setSampleBuffers(true); - format.setStencil(true); - format.setAlpha(true); - format.setRgba(true); - format.setDepth(false); +// QGLFormat format; +// format.setSampleBuffers(true); +// format.setStencil(true); +// format.setAlpha(true); +// format.setRgba(true); +// format.setDepth(false); // Most of hardware refuses to work for us with direct rendering enabled. - format.setDirectRendering(false); +// format.setDirectRendering(false); - setViewport(new QGLWidget(format)); + setViewport(new QOpenGLWidget()); } } From e122ba0919b7b41c5b27f76504ef2b55e3a2bf85 Mon Sep 17 00:00:00 2001 From: mara004 <65915611+mara004@users.noreply.github.com> Date: Mon, 2 Aug 2021 13:16:06 +0200 Subject: [PATCH 2/3] Improve code formatting --- src/core/ImageViewBase.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/ImageViewBase.cpp b/src/core/ImageViewBase.cpp index abaee12cf..c6587f325 100644 --- a/src/core/ImageViewBase.cpp +++ b/src/core/ImageViewBase.cpp @@ -150,16 +150,16 @@ ImageViewBase::ImageViewBase(const QImage& image, if (ApplicationSettings::getInstance().isOpenGlEnabled()) { if (OpenGLSupport::supported()) { -// QGLFormat format; -// format.setSampleBuffers(true); -// format.setStencil(true); -// format.setAlpha(true); -// format.setRgba(true); -// format.setDepth(false); - + //QGLFormat format; + //format.setSampleBuffers(true); + //format.setStencil(true); + //format.setAlpha(true); + //format.setRgba(true); + //format.setDepth(false); + // Most of hardware refuses to work for us with direct rendering enabled. -// format.setDirectRendering(false); - + //format.setDirectRendering(false); + setViewport(new QOpenGLWidget()); } } From 8d4e15f5ab7d53dbca46aa2eadc08feb086bf463 Mon Sep 17 00:00:00 2001 From: Virgil Grigoras Date: Wed, 9 Feb 2022 22:20:19 +0100 Subject: [PATCH 3/3] Enable negative margins Fixes: #3 --- src/core/filters/page_layout/OptionsWidget.ui | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/filters/page_layout/OptionsWidget.ui b/src/core/filters/page_layout/OptionsWidget.ui index df87854ae..3ed6f730c 100644 --- a/src/core/filters/page_layout/OptionsWidget.ui +++ b/src/core/filters/page_layout/OptionsWidget.ui @@ -205,6 +205,9 @@ QToolButton:pressed { 1 + + -9999.000000000000000 + 9999.000000000000000 @@ -215,6 +218,9 @@ QToolButton:pressed { 1 + + -9999.000000000000000 + 9999.000000000000000 @@ -225,6 +231,9 @@ QToolButton:pressed { 1 + + -9999.000000000000000 + 9999.000000000000000 @@ -242,6 +251,9 @@ QToolButton:pressed { 1 + + -9999.000000000000000 + 9999.000000000000000