#include "StatusQ/statuswindow.h" #include #include #include #include #include #include #include void StatusWindow::removeTitleBar() { NSView *nsView = reinterpret_cast(this->winId()); NSWindow *window = [nsView window]; window.titlebarAppearsTransparent = true; window.titleVisibility = NSWindowTitleHidden; window.styleMask |= NSWindowStyleMaskFullSizeContentView; NSButton* close = [window standardWindowButton:NSWindowCloseButton]; NSView* titleBarContainerView = close.superview.superview; [titleBarContainerView setHidden:YES]; } void StatusWindow::showTitleBar() { NSView *nsView = reinterpret_cast(this->winId()); NSWindow *window = [nsView window]; window.titlebarAppearsTransparent = true; window.titleVisibility = NSWindowTitleHidden; window.styleMask |= NSWindowStyleMaskFullSizeContentView; NSButton* close = [window standardWindowButton:NSWindowCloseButton]; NSView* titleBarContainerView = close.superview.superview; [titleBarContainerView setHidden:NO]; }