From 51afac4f221427cd298bb7c91414a147335f8147 Mon Sep 17 00:00:00 2001 From: ALMAS <9382335+almas1992@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:31:38 +0800 Subject: [PATCH] [v3/windows] Fix dpi scaling on start up (#3145) * [v3/windows] Fix dpi scaling on start up * add change log --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/webview_window_windows.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index f093f7558..809f31e3b 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed hex values for arrow keys on Darwin by [jaybeecave](https://github.com/jaybeecave) in [#3052](https://github.com/wailsapp/wails/pull/3052). - Set drag-n-drop for windows to working. Added by [@pylotlight](https://github.com/pylotlight) in [PR](https://github.com/wailsapp/wails/pull/3039) - Fixed bug for linux in doctor in the event user doesn't have proper drivers installed. Added by [@pylotlight](https://github.com/pylotlight) in [PR](https://github.com/wailsapp/wails/pull/3032) +- Fix dpi scaling on start up (windows). Changed by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3145) ### Changed diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index e9fcd18d1..22d23bfe9 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -236,6 +236,8 @@ func (w *windowsWebviewWindow) run() { w.setupChromium() + w.setSize(options.Width, options.Height) + // Register the window with the application getNativeApplication().registerWindow(w)