mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Allow to change font size (#177)
This commit is contained in:
@@ -119,6 +119,7 @@ style::CustomFontSettings UiIntegration::fontSettings() {
|
|||||||
cMainFont(),
|
cMainFont(),
|
||||||
cSemiboldFont(),
|
cSemiboldFont(),
|
||||||
cMonospaceFont(),
|
cMonospaceFont(),
|
||||||
|
cFontSize(),
|
||||||
cSemiboldFontIsBold(),
|
cSemiboldFontIsBold(),
|
||||||
cUseSystemFont(),
|
cUseSystemFont(),
|
||||||
cUseOriginalMetrics(),
|
cUseOriginalMetrics(),
|
||||||
|
@@ -386,6 +386,7 @@ QByteArray GenerateSettingsJson(bool areDefault = false) {
|
|||||||
settings.insert(qsl("forward_retain_selection"), cForwardRetainSelection());
|
settings.insert(qsl("forward_retain_selection"), cForwardRetainSelection());
|
||||||
settings.insert(qsl("forward_on_click"), cForwardChatOnClick());
|
settings.insert(qsl("forward_on_click"), cForwardChatOnClick());
|
||||||
|
|
||||||
|
settingsFonts.insert(qsl("size"), cFontSize());
|
||||||
settingsFonts.insert(qsl("use_system_font"), cUseSystemFont());
|
settingsFonts.insert(qsl("use_system_font"), cUseSystemFont());
|
||||||
settingsFonts.insert(qsl("use_original_metrics"), cUseOriginalMetrics());
|
settingsFonts.insert(qsl("use_original_metrics"), cUseOriginalMetrics());
|
||||||
|
|
||||||
@@ -477,6 +478,10 @@ bool Manager::readCustomFile() {
|
|||||||
cSetMonospaceFont(v);
|
cSetMonospaceFont(v);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ReadIntOption(o, "size", [&](auto v) {
|
||||||
|
cSetFontSize(v);
|
||||||
|
});
|
||||||
|
|
||||||
ReadBoolOption(o, "use_system_font", [&](auto v) {
|
ReadBoolOption(o, "use_system_font", [&](auto v) {
|
||||||
cSetUseSystemFont(v);
|
cSetUseSystemFont(v);
|
||||||
});
|
});
|
||||||
|
@@ -12,6 +12,7 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
|||||||
bool gKotatoFirstRun = true;
|
bool gKotatoFirstRun = true;
|
||||||
|
|
||||||
QString gMainFont, gSemiboldFont, gMonospaceFont;
|
QString gMainFont, gSemiboldFont, gMonospaceFont;
|
||||||
|
int gFontSize = 0;
|
||||||
bool gSemiboldFontIsBold = false;
|
bool gSemiboldFontIsBold = false;
|
||||||
|
|
||||||
#ifdef DESKTOP_APP_USE_PACKAGED_FONTS
|
#ifdef DESKTOP_APP_USE_PACKAGED_FONTS
|
||||||
|
@@ -30,6 +30,7 @@ DeclareSetting(QString, MainFont);
|
|||||||
DeclareSetting(QString, SemiboldFont);
|
DeclareSetting(QString, SemiboldFont);
|
||||||
DeclareSetting(bool, SemiboldFontIsBold);
|
DeclareSetting(bool, SemiboldFontIsBold);
|
||||||
DeclareSetting(QString, MonospaceFont);
|
DeclareSetting(QString, MonospaceFont);
|
||||||
|
DeclareSetting(int, FontSize);
|
||||||
DeclareSetting(bool, UseSystemFont);
|
DeclareSetting(bool, UseSystemFont);
|
||||||
DeclareSetting(bool, UseOriginalMetrics);
|
DeclareSetting(bool, UseOriginalMetrics);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user