github.com/secoba/wails/v2@v2.6.4/pkg/options/mac/titlebar.go (about)

     1  package mac
     2  
     3  // TitleBar contains options for the Mac titlebar
     4  type TitleBar struct {
     5  	TitlebarAppearsTransparent bool
     6  	HideTitle                  bool
     7  	HideTitleBar               bool
     8  	FullSizeContent            bool
     9  	UseToolbar                 bool
    10  	HideToolbarSeparator       bool
    11  }
    12  
    13  // TitleBarDefault results in the default Mac Titlebar
    14  func TitleBarDefault() *TitleBar {
    15  	return &TitleBar{
    16  		TitlebarAppearsTransparent: false,
    17  		HideTitle:                  false,
    18  		HideTitleBar:               false,
    19  		FullSizeContent:            false,
    20  		UseToolbar:                 false,
    21  		HideToolbarSeparator:       false,
    22  	}
    23  }
    24  
    25  // Credit: Comments from Electron site
    26  
    27  // TitleBarHidden results in a hidden title bar and a full size content window,
    28  // yet the title bar still has the standard window controls (“traffic lights”)
    29  // in the top left.
    30  func TitleBarHidden() *TitleBar {
    31  	return &TitleBar{
    32  		TitlebarAppearsTransparent: true,
    33  		HideTitle:                  true,
    34  		HideTitleBar:               false,
    35  		FullSizeContent:            true,
    36  		UseToolbar:                 false,
    37  		HideToolbarSeparator:       false,
    38  	}
    39  }
    40  
    41  // TitleBarHiddenInset results in a hidden title bar with an alternative look where
    42  // the traffic light buttons are slightly more inset from the window edge.
    43  func TitleBarHiddenInset() *TitleBar {
    44  	return &TitleBar{
    45  		TitlebarAppearsTransparent: true,
    46  		HideTitle:                  true,
    47  		HideTitleBar:               false,
    48  		FullSizeContent:            true,
    49  		UseToolbar:                 true,
    50  		HideToolbarSeparator:       true,
    51  	}
    52  }