Hide title bar on macOS
This commit is contained in:
parent
b672d33f25
commit
ddebbf8121
15 changed files with 297 additions and 24 deletions
17
preload.js
17
preload.js
|
@ -113,6 +113,10 @@ try {
|
|||
ipc.send('show-window');
|
||||
};
|
||||
|
||||
window.titleBarDoubleClick = () => {
|
||||
ipc.send('title-bar-double-click');
|
||||
};
|
||||
|
||||
window.setAutoHideMenuBar = autoHide =>
|
||||
ipc.send('set-auto-hide-menu-bar', autoHide);
|
||||
|
||||
|
@ -142,6 +146,19 @@ try {
|
|||
Whisper.events.trigger('setupAsStandalone');
|
||||
});
|
||||
|
||||
{
|
||||
let isFullScreen = config.isFullScreen === 'true';
|
||||
|
||||
window.isFullScreen = () => isFullScreen;
|
||||
// This is later overwritten.
|
||||
window.onFullScreenChange = _.noop;
|
||||
|
||||
ipc.on('full-screen-change', (_event, isFull) => {
|
||||
isFullScreen = Boolean(isFull);
|
||||
window.onFullScreenChange(isFullScreen);
|
||||
});
|
||||
}
|
||||
|
||||
// Settings-related events
|
||||
|
||||
window.showSettings = () => ipc.send('show-settings');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue