From a920eb27a06482ff9f180a154a4cc09384e9e162 Mon Sep 17 00:00:00 2001 From: RaiKoHoff Date: Tue, 9 Jun 2020 16:11:55 +0200 Subject: [PATCH] + chg: workaround for DPI_AWARENESS Font Size problem on DPI_CHANGE --- scintilla/win32/PlatWin.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scintilla/win32/PlatWin.h b/scintilla/win32/PlatWin.h index bae0532e1..e6698c62d 100644 --- a/scintilla/win32/PlatWin.h +++ b/scintilla/win32/PlatWin.h @@ -108,7 +108,9 @@ inline T DLLFunctionEx(LPCWSTR lpDllName, LPCSTR lpProcName) noexcept { } inline UINT DpiForWindow(WindowID wid) noexcept { - return GetWindowDPI(HwndFromWindowID(wid)).y; + //~return GetWindowDPI(HwndFromWindowID(wid)).y; + // retrieving the logPixelsY per window may double the Font Size calculation + return USER_DEFAULT_SCREEN_DPI; // DPI_AWARENESS set by manifest } HCURSOR LoadReverseArrowCursor(DPI_T dpi) noexcept;