From d922c3085a826c3cbf0620d3fc57008219a64419 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 16 Jul 2021 10:23:13 +0400 Subject: [PATCH 1/2] Don't inherit system font style --- ui/style/style_core_custom_font.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/style/style_core_custom_font.cpp b/ui/style/style_core_custom_font.cpp index 570d169..825726f 100644 --- a/ui/style/style_core_custom_font.cpp +++ b/ui/style/style_core_custom_font.cpp @@ -8,6 +8,7 @@ #include "ui/style/style_core_font.h" +#include #include namespace style { @@ -33,7 +34,7 @@ QFont ResolveFont(uint32 flags, int size) { const auto &custom = bold ? BoldFont : RegularFont; const auto useCustom = !custom.family.isEmpty(); - auto result = QFont(); + auto result = QFont(QGuiApplication::font().family()); if (flags & FontMonospace) { result.setFamily(MonospaceFont()); } else if (useCustom) { From 0ad1d2c9652e185dc8f5b07f90419babbd2416ab Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 17 Jul 2021 12:43:35 +0300 Subject: [PATCH 2/2] Check shader compiling/linking in detection. --- ui/gl/gl_detection.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ui/gl/gl_detection.cpp b/ui/gl/gl_detection.cpp index 195f2bc..10a47ed 100644 --- a/ui/gl/gl_detection.cpp +++ b/ui/gl/gl_detection.cpp @@ -6,6 +6,7 @@ // #include "ui/gl/gl_detection.h" +#include "ui/gl/gl_shader.h" #include "ui/integration.h" #include "base/debug_log.h" @@ -87,6 +88,22 @@ Capabilities CheckCapabilities(QWidget *widget) { LOG_ONCE(("OpenGL: Shaders not supported.")); return {}; } + { + auto program = QOpenGLShaderProgram(); + LinkProgram( + &program, + VertexShader({ + VertexViewportTransform(), + VertexPassTextureCoord(), + }), + FragmentShader({ + FragmentSampleARGB32Texture(), + })); + if (!program.isLinked()) { + LOG_ONCE(("OpenGL: Could not link simple shader.")); + return {}; + } + } const auto supported = context->format(); switch (supported.profile()) { case QSurfaceFormat::NoProfile: {