Compare commits

..

4 Commits

Author SHA1 Message Date
Lea Anthony
d9341f76d5 Merge branch 'develop' into windows-scaling-fix 2020-09-10 06:13:28 +10:00
Lea Anthony
8154887824 v1.7.2-pre10 2020-09-09 06:58:30 +10:00
Lea Anthony
39ae91a250 Simplify Subscribe() 2020-09-09 06:27:57 +10:00
Lea Anthony
d7f3cec079 test fix 2020-09-08 09:11:52 +10:00
2 changed files with 8 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
package cmd
// Version - Wails version
const Version = "v1.7.2-pre9"
const Version = "v1.7.2-pre10"

View File

@@ -1431,6 +1431,13 @@ struct webview_priv
style = WS_OVERLAPPED | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU;
}
// Scale
// Credit: https://github.com/webview/webview/issues/54#issuecomment-379528243
HDC hDC = GetDC(NULL);
w->width = GetDeviceCaps(hDC, 88)*w->width/96.0;
w->height = GetDeviceCaps(hDC, 90)*w->height/96.0;
ReleaseDC(NULL, hDC);
rect.left = 0;
rect.top = 0;
rect.right = w->width;