summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-18 13:53:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-18 13:53:55 +0300
commit47b64a55f3b8866924631ad9c22757eda9fb45c2 (patch)
treea52715330ccca217a72b531faee7b05750af6321 /src/mir_core
parentddb6b3bc34d9199225cc81ae7eae7578c7a62693 (diff)
fixes #3104 (Изменение размера шрифта в чате делает его гигантским)
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/Windows/winutil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir_core/src/Windows/winutil.cpp b/src/mir_core/src/Windows/winutil.cpp
index f4e6a84a0e..79a271fdbd 100644
--- a/src/mir_core/src/Windows/winutil.cpp
+++ b/src/mir_core/src/Windows/winutil.cpp
@@ -119,14 +119,14 @@ MIR_CORE_DLL(int) Utils_AssertInsideScreen(RECT *rc)
/////////////////////////////////////////////////////////////////////////////////////////
-static LOGFONTW g_lfDefault;
+static LOGFONTW g_lfDefault = {0};
MIR_CORE_DLL(int) Utils_CorrectFontSize(int size)
{
if (!g_bEnableDpiAware)
return size;
- if (!g_lfDefault.lfWeight)
+ if (!g_lfDefault.lfHeight)
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(g_lfDefault), &g_lfDefault, FALSE);
return size * g_lfDefault.lfHeight / -12;