mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
[windows] Set HiDPI size scaling before setting up chromium
This commit is contained in:
parent
189820135a
commit
e6645136f9
1 changed files with 5 additions and 4 deletions
|
|
@ -193,6 +193,7 @@ func (w *windowsWebviewWindow) run() {
|
|||
exStyle |= w32.WS_EX_APPWINDOW
|
||||
}
|
||||
|
||||
// ToDo: X, Y should also be scaled, should it be always relative to the main monitor?
|
||||
var startX, _ = lo.Coalesce(options.X, w32.CW_USEDEFAULT)
|
||||
var startY, _ = lo.Coalesce(options.Y, w32.CW_USEDEFAULT)
|
||||
|
||||
|
|
@ -222,8 +223,8 @@ func (w *windowsWebviewWindow) run() {
|
|||
style,
|
||||
startX,
|
||||
startY,
|
||||
options.Width,
|
||||
options.Height,
|
||||
w32.CW_USEDEFAULT,
|
||||
w32.CW_USEDEFAULT,
|
||||
parent,
|
||||
appMenu,
|
||||
w32.GetModuleHandle(""),
|
||||
|
|
@ -233,10 +234,10 @@ func (w *windowsWebviewWindow) run() {
|
|||
panic("Unable to create window")
|
||||
}
|
||||
|
||||
w.setupChromium()
|
||||
|
||||
w.setSize(options.Width, options.Height)
|
||||
|
||||
w.setupChromium()
|
||||
|
||||
// Min/max buttons
|
||||
if !options.Windows.DisableMinimiseButton {
|
||||
w.setMinimiseButtonEnabled(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue