Hide Top?
Closed this issue ยท 2 comments
Dontmindmes commented
Hey is it possible to hide this?
https://i.imgur.com/YaP4hE1.png
asticode commented
I believe you need to set this attribute to false
.
Let me know how it goes
CarsonSlovoka commented
tl;dr
try also Frame attribute to false
Hi @Dontmindmes
If you want to hide the entire title bar, try to
new BrowserWindow({frame: false})
frame boolean (optional) - Specify false to create a frameless window. Default is true.
details
if w, err = a.NewWindow("index.html", // it will call atilectron.index.js.consts.eventNames.windowCmdCreate
&astilectron.WindowOptions{ // ๐ json.windowOptions see explain below
Center: astikit.BoolPtr(true),
Height: astikit.IntPtr(700),
Width: astikit.IntPtr(700),
// Closable: astikit.BoolPtr(false),
Frame: astikit.BoolPtr(false), // ๐ add this
}); err != nil {
l.Fatal(fmt.Errorf("main: new window failed: %w", err))
}
- atilectron.index.js.consts.eventNames.windowCmdCreate -> windowCreate(json)
- windowCreate(json) -> new BrowserWindow(json.windowOptions) for example
new BrowserWindow({frame: false})
- json.windowOptions define in the window.go : WindowOptions
- good thing is @asticode already define for us, so you can set
a.NewWindow("", &astilectron.WindowOptions{Frame: astikit.BoolPtr(false)},);
done!
see also
If this helps, please close the issue. Thanks!