diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2008-05-13 13:25:17 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2008-05-13 13:25:17 (GMT) |
commit | 7ccf35f9f3b12d5b5a9f0b3b91a586e7c71f794f (patch) | |
tree | 909f6370ac73eded508c90e28f613e44670e080d | |
parent | f2efd7a4f3d2cdb524345450ad25ddfbd06d7a4d (diff) | |
download | tk-7ccf35f9f3b12d5b5a9f0b3b91a586e7c71f794f.zip tk-7ccf35f9f3b12d5b5a9f0b3b91a586e7c71f794f.tar.gz tk-7ccf35f9f3b12d5b5a9f0b3b91a586e7c71f794f.tar.bz2 |
Support pixel sized font in the +/- keybindings
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | library/console.tcl | 11 |
2 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,6 @@ 2008-05-13 Pat Thoyts <patthoyts@users.sourceforge.net> + * library/console.tcl: Support pixel sized font in +/- keybinding. * tests/listbox.test: -activestyle default is underline on windows. * tests/winDialog.test: Fixed hanging tk_chooseColor tests. diff --git a/library/console.tcl b/library/console.tcl index 6c176bc..cc38ca5 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -4,7 +4,7 @@ # can be used by non-unix systems that do not have built-in support # for shells. # -# RCS: @(#) $Id: console.tcl,v 1.37 2007/12/13 15:26:27 dgp Exp $ +# RCS: @(#) $Id: console.tcl,v 1.38 2008/05/13 13:25:18 patthoyts Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Ajuba Solutions. @@ -554,11 +554,16 @@ proc ::tk::ConsoleBind {w} { } bind Console <<Console_FontSizeIncr>> { set size [font configure TkConsoleFont -size] - font configure TkConsoleFont -size [incr size] + if {$size < 0} {set sign -1} else {set sign 1} + set size [expr {(abs($size) + 1) * $sign}] + font configure TkConsoleFont -size $size } bind Console <<Console_FontSizeDecr>> { set size [font configure TkConsoleFont -size] - font configure TkConsoleFont -size [incr size -1] + if {abs($size) < 2} { return } + if {$size < 0} {set sign -1} else {set sign 1} + set size [expr {(abs($size) - 1) * $sign}] + font configure TkConsoleFont -size $size } ## |