mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
feat(electron): load overlay information from CSS
This commit is contained in:
parent
60192977c9
commit
01512152ea
@ -50,9 +50,10 @@ function initOnElectron() {
|
||||
// Update the native title bar buttons.
|
||||
const electronRemote = utils.dynamicRequire("@electron/remote");
|
||||
const currentWindow = electronRemote.getCurrentWindow();
|
||||
const documentStyle = window.getComputedStyle(document.documentElement);
|
||||
currentWindow.setTitleBarOverlay({
|
||||
color: "red",
|
||||
symbolColor: "white"
|
||||
color: documentStyle.getPropertyValue("--native-titlebar-background"),
|
||||
symbolColor: documentStyle.getPropertyValue("--native-titlebar-foreground")
|
||||
});
|
||||
|
||||
console.log("Electron initialized.");
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
:root {
|
||||
--submenu-opening-delay: 300ms;
|
||||
--native-titlebar-background: var(--left-pane-background-color);
|
||||
--native-titlebar-foreground: var(--main-text-color);
|
||||
}
|
||||
|
||||
html {
|
||||
|
Loading…
x
Reference in New Issue
Block a user