Release 4.2.7+1: adaptive HiDPI window sizing (work-area DIPs + min size) and responsive CSS so the UI opens usable without stretch. Windows 4.2.7.1.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-08-02 12:00:10 +03:00
co-authored by Cursor
parent a1756715ef
commit fa3e11216e
15 changed files with 354 additions and 60 deletions
+10 -4
View File
@@ -76,6 +76,10 @@ func main() {
}
update.CleanupStaleDownloads()
// Before any HWND: declare DPI awareness so CreateWindow/SetSize sizes
// are physical pixels and we can convert DIPs correctly.
enableProcessDPIAware()
log.SetFlags(log.LstdFlags | log.Lshortfile)
cfgPath, err := config.LocateConfig()
@@ -114,15 +118,17 @@ func main() {
// Do NOT auto-download cores on startup — silent network+write looks like malware to AV.
// Sidebar layout (Hiddify-style) needs a wider window than the old column UI.
// Size from monitor work area in DIPs, converted to physical pixels for
// DPI-aware CreateWindow (fixed 920x680 physical collapses CSS <700px on HiDPI).
initW, initH := initialWindowPhysicalSize()
w := webview2.NewWithOptions(webview2.WebViewOptions{
Debug: false,
AutoFocus: true,
DataPath: dataPath,
WindowOptions: webview2.WindowOptions{
Title: "EvilFox",
Width: 920,
Height: 680,
Width: uint(initW),
Height: uint(initH),
Center: true,
IconId: 1,
},
@@ -137,7 +143,7 @@ func main() {
}()
applyWindowIcon(w.Window())
w.SetSize(920, 680, webview2.HintNone)
applyAdaptiveWindowSize(w)
mustBind(w, "getState", a.getState)
mustBind(w, "connect", a.connect)