Skip to content

Commit

Permalink
Add reset interface scaling shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnovak committed Jul 21, 2024
1 parent 28fad6a commit 1875295
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ type AppShortcut = enum
scRestoreLayout3
scRestoreLayout4

scResetUIScaling

# Misc
scShowAboutDialog
scOpenUserManual
Expand Down Expand Up @@ -1175,6 +1177,9 @@ func mkQuickRefInterface(a): seq[seq[QuickRefItem]] =
scRestoreLayout2.sc, "Restore window layout 2".desc,
scRestoreLayout3.sc, "Restore window layout 3".desc,
scRestoreLayout4.sc, "Restore window layout 4".desc,
QuickRefSepa,

scResetUIScaling.sc, "Reset interface scaling".desc
],
@[
@[fmt"Ctrl{HairSp}+{HairSp}{IconArrowsHoriz}"].csc,
Expand Down Expand Up @@ -1504,6 +1509,8 @@ let DefaultAppShortcuts = {
scRestoreLayout3: @[mkKeyShortcut(keyF7, {})],
scRestoreLayout4: @[mkKeyShortcut(keyF8, {})],

scResetUIScaling: @[mkKeyShortcut(keyF11, {mkCtrl})],

# Misc
scShowAboutDialog: @[mkKeyShortcut(keyA, {mkCtrl})],
scOpenUserManual: @[mkKeyShortcut(keyF1, {})],
Expand Down Expand Up @@ -7434,6 +7441,9 @@ proc handleGlobalKeyEvents(a) =
elif ke.isShortcutDown(scRestoreLayout3, a): restoreLayout(2, a)
elif ke.isShortcutDown(scRestoreLayout4, a): restoreLayout(3, a)

elif ke.isShortcutDown(scResetUIScaling, a):
discard

# }}}
# {{{ emExcavateTunnel, emEraseCell, emEraseTrail, emDrawClearFloor, emColorFloor
of emExcavateTunnel, emEraseCell, emEraseTrail, emDrawClearFloor,
Expand Down

0 comments on commit 1875295

Please sign in to comment.