Use the setTitleVisibility to control tittlebar's visibility

This commit is contained in:
Cheng Zhao 2016-06-17 10:54:50 +09:00
parent d2a831aea5
commit 9eea973d31
2 changed files with 60 additions and 38 deletions

View file

@ -96,9 +96,12 @@ class NativeWindowMac : public NativeWindow {
void SetStyleMask(bool on, NSUInteger flag);
void SetCollectionBehavior(bool on, NSUInteger flag);
bool should_hide_native_toolbar_in_fullscreen() const {
return should_hide_native_toolbar_in_fullscreen_;
}
enum TitleBarStyle {
NORMAL,
HIDDEN,
HIDDEN_INSET,
};
TitleBarStyle title_bar_style() const { return title_bar_style_; }
protected:
// Return a vector of non-draggable regions that fill a window of size
@ -138,11 +141,8 @@ class NativeWindowMac : public NativeWindow {
// The presentation options before entering kiosk mode.
NSApplicationPresentationOptions kiosk_options_;
// The window title, for frameless windows we only set title when fullscreen.
std::string title_;
// Force showing the buttons for frameless window.
bool force_show_buttons_;
// The "titleBarStyle" option.
TitleBarStyle title_bar_style_;
// Whether to hide the native toolbar under fullscreen mode.
bool should_hide_native_toolbar_in_fullscreen_;