mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Merge pull request #4225 from SiriusXT/master
Click the button to reset the zoom level
This commit is contained in:
		| @@ -53,6 +53,9 @@ class ZoomComponent extends Component { | |||||||
|     zoomInEvent() { |     zoomInEvent() { | ||||||
|         this.setZoomFactorAndSave(this.getCurrentZoom() + 0.1); |         this.setZoomFactorAndSave(this.getCurrentZoom() + 0.1); | ||||||
|     } |     } | ||||||
|  |     zoomResetEvent() { | ||||||
|  |         this.setZoomFactorAndSave(1); | ||||||
|  |     } | ||||||
|      |      | ||||||
|     setZoomFactorAndSaveEvent({zoomFactor}) { |     setZoomFactorAndSaveEvent({zoomFactor}) { | ||||||
|         this.setZoomFactorAndSave(zoomFactor); |         this.setZoomFactorAndSave(zoomFactor); | ||||||
|   | |||||||
| @@ -131,7 +131,7 @@ const TPL = ` | |||||||
|                  |                  | ||||||
|                 <a data-trigger-command="zoomOut" title="Zoom Out" class="bx bx-minus"></a> |                 <a data-trigger-command="zoomOut" title="Zoom Out" class="bx bx-minus"></a> | ||||||
|                  |                  | ||||||
|                 <span class="zoom-state"></span> |                 <span data-trigger-command="zoomReset" title="Reset Zoom Level" class="zoom-state"></span> | ||||||
|                  |                  | ||||||
|                 <a data-trigger-command="zoomIn" title="Zoom In" class="bx bx-plus"></a> |                 <a data-trigger-command="zoomIn" title="Zoom In" class="bx bx-plus"></a> | ||||||
|             </div> |             </div> | ||||||
|   | |||||||
| @@ -495,6 +495,12 @@ const DEFAULT_KEYBOARD_ACTIONS = [ | |||||||
|         defaultShortcuts: isElectron ? ["CommandOrControl+="] : [], |         defaultShortcuts: isElectron ? ["CommandOrControl+="] : [], | ||||||
|         scope: "window" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |         actionName: "zoomReset", | ||||||
|  |         description: "Reset zoom level", | ||||||
|  |         defaultShortcuts: isElectron ? ["CommandOrControl+0"] : [], | ||||||
|  |         scope: "window" | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|         actionName: "copyWithoutFormatting", |         actionName: "copyWithoutFormatting", | ||||||
|         defaultShortcuts: ["CommandOrControl+Alt+C"], |         defaultShortcuts: ["CommandOrControl+Alt+C"], | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user