Telegram: fix default font

This commit is contained in:
Gerasim Troeglazov
2020-06-17 15:47:02 +10:00
parent c3a63f8656
commit 5db8255d82
2 changed files with 31 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
From b23d285386ee8af2fc3de314f6a0f85f39d7e79a Mon Sep 17 00:00:00 2001
From ca93c9a0ddd33e8a7efb416531cd5c93818b07a9 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 6 Jun 2020 13:36:40 +1000
Subject: Add Haiku support
@@ -107,7 +107,7 @@ index 588bf05..3f6a103 100644
if (!updater.exists()) {
QFileInfo current(curUpdater);
diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp
index 64fddfb..511cd7f 100644
index 2d0af62..7f1a5fe 100644
--- a/Telegram/SourceFiles/data/data_session.cpp
+++ b/Telegram/SourceFiles/data/data_session.cpp
@@ -226,7 +226,7 @@ Session::Session(not_null<Main::Session*> session)
@@ -151,7 +151,7 @@ index 17a2561..27b5de5 100644
? tr::lng_disable_notifications_from_tray(tr::now)
: tr::lng_enable_notifications_from_tray(tr::now);
diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
index b2234b6..e3e89ce 100644
index 9aaf144..7e698c1 100644
--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
+++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
@@ -365,7 +365,7 @@ OverlayWidget::OverlayWidget()
@@ -3923,3 +3923,28 @@ index 17bb351..f02e702 100644
--
2.26.0
From f3d682717f89b0e1734a4c41e8b2421d84d35b92 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 17 Jun 2020 15:45:27 +1000
Subject: Don't override fonts for Haiku
diff --git a/Telegram/lib_ui/ui/style/style_core_custom_font.cpp b/Telegram/lib_ui/ui/style/style_core_custom_font.cpp
index 570d169..8644d20 100644
--- a/Telegram/lib_ui/ui/style/style_core_custom_font.cpp
+++ b/Telegram/lib_ui/ui/style/style_core_custom_font.cpp
@@ -44,7 +44,10 @@ QFont ResolveFont(uint32 flags, int size) {
const auto point = good.isEmpty() ? size : good.front();
result = Database.font(custom.family, custom.style, point);
} else {
+// Don't override fonts for Haiku
+#ifndef __HAIKU__
result.setFamily(GetFontOverride(flags));
+#endif
if (bold) {
#ifdef DESKTOP_APP_USE_PACKAGED_FONTS
result.setWeight(QFont::DemiBold);
--
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="b550c98fff17e38cbbbb6099bebc9dd4a12f8943dff26dbdc1f7952759b6a6e9"
@@ -118,11 +118,12 @@ BUILD()
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \
-DTDESKTOP_API_TEST=OFF \
-DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \
-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \
-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=ON \
-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \
-DDESKTOP_APP_USE_PACKAGED_GSL=OFF \
-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF \
-DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF \
-DDESKTOP_APP_USE_PACKAGED_FONTS=ON \
-DDESKTOP_APP_USE_HUNSPELL_ONLY=ON \
-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF \
-DTDESKTOP_API_ID=$TELEGRAM_API_ID \