From d6eb75394884f38edcc49b6f097fe0b70b29ca3a Mon Sep 17 00:00:00 2001 From: mntone Date: Sat, 29 Aug 2020 22:24:50 +0900 Subject: [PATCH] Fix issue that ChromeWindow is misplaced after changed text size. --- .../Chrome/Primitives/ChromeWindow..cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/MetroRadiance.Chrome/Chrome/Primitives/ChromeWindow..cs b/source/MetroRadiance.Chrome/Chrome/Primitives/ChromeWindow..cs index 9297cde2..f5a9de2f 100644 --- a/source/MetroRadiance.Chrome/Chrome/Primitives/ChromeWindow..cs +++ b/source/MetroRadiance.Chrome/Chrome/Primitives/ChromeWindow..cs @@ -432,6 +432,13 @@ private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref b return new IntPtr(3); } + else if (msg == (int)WindowsMessages.WM_SETTINGCHANGE) + { + this.UpdateLocationAndSize(); + handled = true; + return IntPtr.Zero; + } + // Note: Double scaling is avoided on .NET Framework 4.6.2 or later. else if (msg == (int)WindowsMessages.WM_DPICHANGED) {