mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Support hidden titlebar
This commit is contained in:
@@ -4,13 +4,3 @@ package mac
|
||||
type Options struct {
|
||||
TitleBar *TitleBar
|
||||
}
|
||||
|
||||
// TitleBar contains options for the Mac titlebar
|
||||
type TitleBar struct {
|
||||
TitlebarAppearsTransparent bool
|
||||
HideTitle bool
|
||||
HideTitleBar bool
|
||||
FullSizeContent bool
|
||||
UseToolbar bool
|
||||
HideToolbarSeparator bool
|
||||
}
|
||||
|
||||
27
v2/pkg/options/mac/titlebar.go
Normal file
27
v2/pkg/options/mac/titlebar.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package mac
|
||||
|
||||
// TitleBar contains options for the Mac titlebar
|
||||
type TitleBar struct {
|
||||
TitlebarAppearsTransparent bool
|
||||
HideTitle bool
|
||||
HideTitleBar bool
|
||||
FullSizeContent bool
|
||||
UseToolbar bool
|
||||
HideToolbarSeparator bool
|
||||
}
|
||||
|
||||
// Credit: Comments from Electron site
|
||||
|
||||
// TitleBarHidden results in a hidden title bar and a full size content window,
|
||||
// yet the title bar still has the standard window controls (“traffic lights”)
|
||||
// in the top left.
|
||||
func TitleBarHidden() *TitleBar {
|
||||
return &TitleBar{
|
||||
TitlebarAppearsTransparent: true,
|
||||
HideTitle: true,
|
||||
HideTitleBar: false,
|
||||
FullSizeContent: true,
|
||||
UseToolbar: false,
|
||||
HideToolbarSeparator: false,
|
||||
}
|
||||
}
|
||||
@@ -24,14 +24,7 @@ func main() {
|
||||
Fullscreen: false,
|
||||
Colour: 0xFF000088,
|
||||
Mac: &mac.Options{
|
||||
TitleBar: &mac.TitleBar{
|
||||
HideTitle: false,
|
||||
HideTitleBar: false,
|
||||
TitlebarAppearsTransparent: true,
|
||||
FullSizeContent: false,
|
||||
UseToolbar: true,
|
||||
HideToolbarSeparator: true,
|
||||
},
|
||||
TitleBar: mac.TitleBarHidden(),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user