mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	feat(native-buttons): adjustable offset
This commit is contained in:
		
							parent
							
								
									00c6d97e4a
								
							
						
					
					
						commit
						05c5109331
					
				| @ -68,7 +68,9 @@ function initTitleBarButtons() { | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // FIXME: call only on darwin
 |         // FIXME: call only on darwin
 | ||||||
|         currentWindow.setWindowButtonPosition({ x: 20, y: 20 }); |         const xOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-x-offset"), 10); | ||||||
|  |         const yOffset = parseInt(style.getPropertyValue("--native-titlebar-darwin-y-offset"), 10); | ||||||
|  |         currentWindow.setWindowButtonPosition({ x: xOffset, y: yOffset }); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     // Update the native title bar buttons.
 |     // Update the native title bar buttons.
 | ||||||
|  | |||||||
| @ -41,6 +41,8 @@ body { | |||||||
| 
 | 
 | ||||||
|     --native-titlebar-background: var(--main-background-color); |     --native-titlebar-background: var(--main-background-color); | ||||||
|     --native-titlebar-foreground: var(--main-text-color); |     --native-titlebar-foreground: var(--main-text-color); | ||||||
|  |     --native-titlebar-darwin-x-offset: 10; | ||||||
|  |     --native-titlebar-darwin-y-offset: 12; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| body.layout-horizontal { | body.layout-horizontal { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran