diff --git a/Telegram/SourceFiles/core/ui_integration.cpp b/Telegram/SourceFiles/core/ui_integration.cpp index cc7a27264..6bc5e4910 100644 --- a/Telegram/SourceFiles/core/ui_integration.cpp +++ b/Telegram/SourceFiles/core/ui_integration.cpp @@ -119,6 +119,7 @@ style::CustomFontSettings UiIntegration::fontSettings() { cMainFont(), cSemiboldFont(), cMonospaceFont(), + cFontSize(), cSemiboldFontIsBold(), cUseSystemFont(), cUseOriginalMetrics(), diff --git a/Telegram/SourceFiles/kotato/json_settings.cpp b/Telegram/SourceFiles/kotato/json_settings.cpp index 75b12dd86..9a6c8099a 100644 --- a/Telegram/SourceFiles/kotato/json_settings.cpp +++ b/Telegram/SourceFiles/kotato/json_settings.cpp @@ -386,6 +386,7 @@ QByteArray GenerateSettingsJson(bool areDefault = false) { settings.insert(qsl("forward_retain_selection"), cForwardRetainSelection()); settings.insert(qsl("forward_on_click"), cForwardChatOnClick()); + settingsFonts.insert(qsl("size"), cFontSize()); settingsFonts.insert(qsl("use_system_font"), cUseSystemFont()); settingsFonts.insert(qsl("use_original_metrics"), cUseOriginalMetrics()); @@ -477,6 +478,10 @@ bool Manager::readCustomFile() { cSetMonospaceFont(v); }); + ReadIntOption(o, "size", [&](auto v) { + cSetFontSize(v); + }); + ReadBoolOption(o, "use_system_font", [&](auto v) { cSetUseSystemFont(v); }); diff --git a/Telegram/SourceFiles/kotato/settings.cpp b/Telegram/SourceFiles/kotato/settings.cpp index d2ae752fe..0ae54a121 100644 --- a/Telegram/SourceFiles/kotato/settings.cpp +++ b/Telegram/SourceFiles/kotato/settings.cpp @@ -12,6 +12,7 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL bool gKotatoFirstRun = true; QString gMainFont, gSemiboldFont, gMonospaceFont; +int gFontSize = 0; bool gSemiboldFontIsBold = false; #ifdef DESKTOP_APP_USE_PACKAGED_FONTS diff --git a/Telegram/SourceFiles/kotato/settings.h b/Telegram/SourceFiles/kotato/settings.h index 65268b2ba..6624bc9b2 100644 --- a/Telegram/SourceFiles/kotato/settings.h +++ b/Telegram/SourceFiles/kotato/settings.h @@ -30,6 +30,7 @@ DeclareSetting(QString, MainFont); DeclareSetting(QString, SemiboldFont); DeclareSetting(bool, SemiboldFontIsBold); DeclareSetting(QString, MonospaceFont); +DeclareSetting(int, FontSize); DeclareSetting(bool, UseSystemFont); DeclareSetting(bool, UseOriginalMetrics);