Telegram: use system mono font.

This commit is contained in:
Gerasim Troeglazov
2020-04-25 12:27:28 +10:00
parent e46d7c29ea
commit 7953ff7dca
2 changed files with 34 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
From c8d30b6c1adc2f2c01662363ff0fbe7d7d850511 Mon Sep 17 00:00:00 2001
From d4d8066ce8b75d97e5db685ca9415b63959bca88 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 24 Apr 2020 23:12:18 +1000
Subject: Add Haiku support
@@ -3905,3 +3905,35 @@ index a45a6b6..10c9cc1 100644
--
2.26.0
From 21f24ae02b1b69676dfe96bb317835eb0144b1ed Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 25 Apr 2020 11:42:37 +1000
Subject: Use system font
diff --git a/Telegram/lib_ui/ui/style/style_core_font.cpp b/Telegram/lib_ui/ui/style/style_core_font.cpp
index 0cd6580..526cc03 100644
--- a/Telegram/lib_ui/ui/style/style_core_font.cpp
+++ b/Telegram/lib_ui/ui/style/style_core_font.cpp
@@ -87,7 +87,7 @@ bool LoadCustomFont(const QString &filePath, const QString &familyName, int flag
QString MonospaceFont() {
static const auto family = [&]() -> QString {
-#ifndef Q_OS_LINUX
+#if !defined Q_OS_LINUX && !defined Q_OS_HAIKU
const auto kTryFirst = std::initializer_list<QString>{
"Consolas",
"Liberation Mono",
@@ -100,7 +100,7 @@ QString MonospaceFont() {
return family;
}
}
-#endif // !Q_OS_LINUX
+#endif // !Q_OS_LINUX && !Q_OS_HAIKU
const auto type = QFontDatabase::FixedFont;
return QFontDatabase::systemFont(type).family();
--
2.26.0

View File

@@ -3,7 +3,7 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
HOMEPAGE="https://www.telegram.org/"
COPYRIGHT="2013-2020 Telegram"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="86d2acc2dfd426ea222ae94984d81e60774f16f3ecc3405578377d90f809a950"