summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoret <et>2025-12-05 19:33:17 (GMT)
committeret <et>2025-12-05 19:33:17 (GMT)
commit2dcf406a43d780c94720c15e54166e9b95373824 (patch)
tree37af6b654cf557174a383355d6406b006b2f74e9
parentec243d881c45394602c1c0f1322808df72365cb9 (diff)
downloadtk-tip_742.zip
tk-tip_742.tar.gz
tk-tip_742.tar.bz2
TIP #742: Add Control+MouseWheel zoom support to Tk consoletip_742
-rwxr-xr-x[-rw-r--r--]library/console.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/console.tcl b/library/console.tcl
index 37a0653..143aa86 100644..100755
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -107,6 +107,14 @@ proc ::tk::ConsoleInit {} {
}
bind Console <FocusIn> [list ::tk::console::FontchooserFocus %W 1]
bind Console <FocusOut> [list ::tk::console::FontchooserFocus %W 0]
+ bind . <Control-MouseWheel> {
+ if {%D > 0} {
+ event generate .console <<Console_FontSizeIncr>>
+ } else {
+ event generate .console <<Console_FontSizeDecr>>
+ }
+ }
+
}
AmpMenuArgs .menubar.edit add command -label [mc "&Increase Font Size"] \
-accel "$mod++" -command {event generate .console <<Console_FontSizeIncr>>}