Skip to content

Commit

Permalink
Merge pull request #4225 from SiriusXT/master
Browse files Browse the repository at this point in the history
Click the button to reset the zoom level
  • Loading branch information
zadam authored Sep 5, 2023
2 parents f5ddabc + 06eb522 commit 72b2a6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/public/app/components/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class ZoomComponent extends Component {
zoomInEvent() {
this.setZoomFactorAndSave(this.getCurrentZoom() + 0.1);
}

zoomResetEvent() {
this.setZoomFactorAndSave(1);
}

setZoomFactorAndSaveEvent({zoomFactor}) {
this.setZoomFactorAndSave(zoomFactor);
}
Expand Down
2 changes: 1 addition & 1 deletion src/public/app/widgets/buttons/global_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const TPL = `
<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>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/services/keyboard_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ const DEFAULT_KEYBOARD_ACTIONS = [
defaultShortcuts: isElectron ? ["CommandOrControl+="] : [],
scope: "window"
},
{
actionName: "zoomReset",
description: "Reset zoom level",
defaultShortcuts: isElectron ? ["CommandOrControl+0"] : [],
scope: "window"
},
{
actionName: "copyWithoutFormatting",
defaultShortcuts: ["CommandOrControl+Alt+C"],
Expand Down

0 comments on commit 72b2a6e

Please sign in to comment.