mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-01 20:32:19 +08:00
fix(native-buttons): regressions on mac
This commit is contained in:
parent
aad2f93844
commit
88a93e3a7b
@ -66,7 +66,6 @@ function initTitleBarButtons() {
|
|||||||
currentWindow.setTitleBarOverlay({ color, symbolColor });
|
currentWindow.setTitleBarOverlay({ color, symbolColor });
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: call only on darwin
|
|
||||||
if (window.glob.platform === "darwin") {
|
if (window.glob.platform === "darwin") {
|
||||||
const xOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-x-offset"), 10);
|
const xOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-x-offset"), 10);
|
||||||
const yOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-y-offset"), 10);
|
const yOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-y-offset"), 10);
|
||||||
|
@ -98,7 +98,12 @@ export default class DesktopLayout {
|
|||||||
const isMac = (window.glob.platform === "darwin");
|
const isMac = (window.glob.platform === "darwin");
|
||||||
const isWindows = (window.glob.platform === "win32");
|
const isWindows = (window.glob.platform === "win32");
|
||||||
const hasNativeTitleBar = (window.glob.hasNativeTitleBar);
|
const hasNativeTitleBar = (window.glob.hasNativeTitleBar);
|
||||||
const fullWidthTabBar = (launcherPaneIsHorizontal && !isMac);
|
|
||||||
|
/**
|
||||||
|
* If true, the tab bar is displayed above the launcher pane with full width; if false (default), the tab bar is displayed in the rest pane.
|
||||||
|
* On macOS we need to force the full-width tab bar on Electron in order to allow the semaphore (window controls) enough space.
|
||||||
|
*/
|
||||||
|
const fullWidthTabBar = (launcherPaneIsHorizontal || (!hasNativeTitleBar && isMac));
|
||||||
const customTitleBarButtons = (hasNativeTitleBar && !isMac && !isWindows);
|
const customTitleBarButtons = (hasNativeTitleBar && !isMac && !isWindows);
|
||||||
|
|
||||||
return new RootContainer(true)
|
return new RootContainer(true)
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
assetPath: "<%= assetPath %>",
|
assetPath: "<%= assetPath %>",
|
||||||
appPath: "<%= appPath %>",
|
appPath: "<%= appPath %>",
|
||||||
platform: "<%= platform %>",
|
platform: "<%= platform %>",
|
||||||
hasNativeTitleBar: "<%= hasNativeTitleBar %>",
|
hasNativeTitleBar: <%= hasNativeTitleBar %>,
|
||||||
TRILIUM_SAFE_MODE: <%= !!process.env.TRILIUM_SAFE_MODE %>
|
TRILIUM_SAFE_MODE: <%= !!process.env.TRILIUM_SAFE_MODE %>
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user