This commit is contained in:
Araxeus
2022-04-10 21:16:43 +03:00
parent 768ec7bda7
commit d23bfe9368
5 changed files with 108 additions and 31 deletions

View File

@ -1,6 +1,7 @@
const { ipcRenderer } = require("electron");
const config = require("../../config");
const { Titlebar, Color } = require("custom-electron-titlebar");
const { isEnabled } = require("../../config/plugins");
function $(selector) { return document.querySelector(selector); }
module.exports = () => {
@ -25,6 +26,12 @@ module.exports = () => {
}
});
if (isEnabled("picture-in-picture")) {
ipcRenderer.on("pip-toggle", (_, pipEnabled) => {
bar.refreshMenu();
});
}
// Increases the right margin of Navbar background when the scrollbar is visible to avoid blocking it (z-index doesn't affect it)
document.addEventListener('apiLoaded', () => {
setNavbarMargin();