mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 13:47:47 +00:00
Allow to change font size (#177)
This commit is contained in:
parent
b0fed1a6a0
commit
c49444b152
@ -119,6 +119,7 @@ style::CustomFontSettings UiIntegration::fontSettings() {
|
||||
cMainFont(),
|
||||
cSemiboldFont(),
|
||||
cMonospaceFont(),
|
||||
cFontSize(),
|
||||
cSemiboldFontIsBold(),
|
||||
cUseSystemFont(),
|
||||
cUseOriginalMetrics(),
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user