energye / energy

Energy is a framework developed by Go language based on CEF (Chromium Embedded Framework) for developing cross-platform desktop applications for Windows, Mac OS X, and Linux
https://energye.github.io
Apache License 2.0
362 stars 24 forks source link

DPI greater than 1.5, white window edge issue #35

Closed sxmxta closed 2 hours ago

sxmxta commented 2 hours ago

When the screen zoom ratio is 1.5 or above, white borders appear on the window. After adjustment, it returns to normal lcl.Application.SetScaled(true)

This issue is due to: lcl.Application.SetScaled(true) set in incorrect position causes

The correct way:

cef.SetBrowserProcessStartAfterCallback(func(b bool) {
    lcl.Application.SetScaled(true)
})
sxmxta commented 1 hour ago

Automatic window scaling: lcl.Application.SetScaled(true)