mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01: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 });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // FIXME: call only on darwin
 | 
			
		||||
        if (window.glob.platform === "darwin") {
 | 
			
		||||
            const xOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-x-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 isWindows = (window.glob.platform === "win32");
 | 
			
		||||
        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);
 | 
			
		||||
 | 
			
		||||
        return new RootContainer(true)
 | 
			
		||||
 | 
			
		||||
@ -37,7 +37,7 @@
 | 
			
		||||
        assetPath: "<%= assetPath %>",
 | 
			
		||||
        appPath: "<%= appPath %>",
 | 
			
		||||
        platform: "<%= platform %>",
 | 
			
		||||
        hasNativeTitleBar: "<%= hasNativeTitleBar %>",
 | 
			
		||||
        hasNativeTitleBar: <%= hasNativeTitleBar %>,
 | 
			
		||||
        TRILIUM_SAFE_MODE: <%= !!process.env.TRILIUM_SAFE_MODE %>
 | 
			
		||||
    };
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user