Updated lib_ui sources to TDesktop version 2.8.11

This commit is contained in:
Eric Kotato 2021-07-18 23:18:59 +03:00
commit 2f8789f265
2 changed files with 19 additions and 1 deletions

View file

@ -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: {

View file

@ -9,6 +9,7 @@
#include "ui/style/style_core_font.h"
#include "ui/integration.h"
#include <QGuiApplication>
#include <QFontDatabase>
namespace style {
@ -37,7 +38,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) {