Hide navigation bar when window is in fullscreen
This commit is contained in:
parent
e9bca98de8
commit
521c8d2d48
@ -12,6 +12,10 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: var(--nav-width);
|
width: var(--nav-width);
|
||||||
|
|
||||||
|
body.fullscreen & {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigation > :not(#service-buttons) {
|
#navigation > :not(#service-buttons) {
|
||||||
|
@ -835,3 +835,8 @@ function setContextMenu(webContents: WebContents) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipcRenderer.on('fullscreenchange', (e, fullscreen) => {
|
||||||
|
if (fullscreen) document.body.classList.add('fullscreen');
|
||||||
|
else document.body.classList.remove('fullscreen');
|
||||||
|
});
|
||||||
|
@ -129,6 +129,13 @@ export default class MainWindow extends Window {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.on('enter-full-screen', () => {
|
||||||
|
window.webContents.send('fullscreenchange', true);
|
||||||
|
});
|
||||||
|
window.on('leave-full-screen', () => {
|
||||||
|
window.webContents.send('fullscreenchange', false);
|
||||||
|
});
|
||||||
|
|
||||||
// Load navigation view
|
// Load navigation view
|
||||||
window.loadFile(path.resolve(Meta.RESOURCES_PATH, 'index.html'))
|
window.loadFile(path.resolve(Meta.RESOURCES_PATH, 'index.html'))
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
|
Loading…
Reference in New Issue
Block a user