mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	put window on top
This commit is contained in:
		| @@ -53,6 +53,13 @@ export default class TitleBarButtonsWidget extends BasicWidget { | ||||
|         const $maximizeBtn = this.$widget.find(".maximize-btn"); | ||||
|         const $closeBtn = this.$widget.find(".close-btn"); | ||||
|          | ||||
|         //When the window is restarted, the window will not be reset when it is set to the top, so get the window status and set the icon background | ||||
|         (function() { | ||||
|             const remote = utils.dynamicRequire('@electron/remote'); | ||||
|             if (remote.BrowserWindow.getFocusedWindow().isAlwaysOnTop()) { | ||||
|                 $topBtn.css("background-color", "var(--accented-background-color)"); | ||||
|             } | ||||
|         }()); | ||||
|         $topBtn.on('click', () => { | ||||
|             $topBtn.trigger('blur'); | ||||
|             const remote = utils.dynamicRequire('@electron/remote'); | ||||
| @@ -66,6 +73,7 @@ export default class TitleBarButtonsWidget extends BasicWidget { | ||||
|                 $topBtn.css("background-color", "var(--accented-background-color)"); | ||||
|             } | ||||
|         }); | ||||
|          | ||||
|         $minimizeBtn.on('click', () => { | ||||
|             $minimizeBtn.trigger('blur'); | ||||
|             const remote = utils.dynamicRequire('@electron/remote'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user