From 0c120eccc905e0a7f17750ba2e228596ff0b30fd Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 24 Sep 2020 06:22:49 +1000 Subject: [PATCH] Support HiddenInset Titlebar --- v2/pkg/options/mac/titlebar.go | 15 +++++++++++++++ v2/test/runtime/main.go | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/v2/pkg/options/mac/titlebar.go b/v2/pkg/options/mac/titlebar.go index b3ea31d12..5eea04f36 100644 --- a/v2/pkg/options/mac/titlebar.go +++ b/v2/pkg/options/mac/titlebar.go @@ -25,3 +25,18 @@ func TitleBarHidden() *TitleBar { HideToolbarSeparator: false, } } + +// TitleBarHiddenInset results in a hidden title bar with an alternative look where +// the traffic light buttons are slightly more inset from the window edge. +func TitleBarHiddenInset() *TitleBar { + + return &TitleBar{ + TitlebarAppearsTransparent: true, + HideTitle: true, + HideTitleBar: false, + FullSizeContent: true, + UseToolbar: true, + HideToolbarSeparator: true, + } + +} diff --git a/v2/test/runtime/main.go b/v2/test/runtime/main.go index 5b9909eb5..791d025e0 100644 --- a/v2/test/runtime/main.go +++ b/v2/test/runtime/main.go @@ -24,7 +24,7 @@ func main() { Fullscreen: false, Colour: 0xFF000088, Mac: &mac.Options{ - TitleBar: mac.TitleBarHidden(), + TitleBar: mac.TitleBarHiddenInset(), }, })