mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 18:42:28 +08:00
feat(native-buttons): set arbitrary offset for traffic light
This commit is contained in:
parent
cd8c596bef
commit
00c6d97e4a
@ -63,8 +63,12 @@ function initTitleBarButtons() {
|
|||||||
const symbolColor = style.getPropertyValue("--native-titlebar-foreground");
|
const symbolColor = style.getPropertyValue("--native-titlebar-foreground");
|
||||||
|
|
||||||
if (color && symbolColor) {
|
if (color && symbolColor) {
|
||||||
currentWindow.setTitleBarOverlay({ color, symbolColor });
|
// FIXME, do this only on windows
|
||||||
|
// currentWindow.setTitleBarOverlay({ color, symbolColor });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: call only on darwin
|
||||||
|
currentWindow.setWindowButtonPosition({ x: 20, y: 20 });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the native title bar buttons.
|
// Update the native title bar buttons.
|
||||||
|
@ -115,7 +115,7 @@ async function createMainWindow(app: App) {
|
|||||||
function getWindowExtraOpts() {
|
function getWindowExtraOpts() {
|
||||||
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
||||||
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
|
if (!optionService.getOptionBool('nativeTitleBarVisible')) {
|
||||||
extraOpts.titleBarStyle = "hidden";
|
extraOpts.titleBarStyle = (process.platform !== "darwin" ? "hidden" : "hiddenInset");
|
||||||
extraOpts.titleBarOverlay = true;
|
extraOpts.titleBarOverlay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user