Merge pull request #991 from stffabi/feature/windows-frameless-border

[windows] Support drawing a frame for frameless to support hiding the titlebar
This commit is contained in:
Lea Anthony
2021-12-02 04:00:01 -08:00
committed by GitHub
4 changed files with 23 additions and 7 deletions

View File

@@ -34,6 +34,9 @@ func NewWindow(parent winc.Controller, appoptions *options.App) *Window {
var dwStyle = w32.WS_OVERLAPPEDWINDOW
if appoptions.Frameless {
dwStyle = w32.WS_POPUP
if winoptions := appoptions.Windows; winoptions != nil && winoptions.EnableFramelessBorder {
dwStyle |= w32.WS_BORDER
}
}
winc.RegClassOnlyOnce("wailsWindow")

View File

@@ -5,4 +5,7 @@ type Options struct {
WebviewIsTransparent bool
WindowIsTranslucent bool
DisableWindowIcon bool
// Draw a border around the window, even if the window is frameless
EnableFramelessBorder bool
}