diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-28 11:17:14 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-28 11:17:14 (GMT) |
commit | b2131c84660d210c0da2bdf89fb44c9d67fb224e (patch) | |
tree | df73f45e23a41814b98ddc25fce584c3e93e4bdf /library | |
parent | 7cc18aa23f4cebdc711c675468866b483f7822e0 (diff) | |
download | tk-b2131c84660d210c0da2bdf89fb44c9d67fb224e.zip tk-b2131c84660d210c0da2bdf89fb44c9d67fb224e.tar.gz tk-b2131c84660d210c0da2bdf89fb44c9d67fb224e.tar.bz2 |
Bug [2501278]: ttk::scale keyboard binding problem
FossilOrigin-Name: 3fec32a981aa335f1c3628308c691c45029b6d3f
Diffstat (limited to 'library')
-rw-r--r-- | library/ttk/scale.tcl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl index 23d08ed..4a534de 100644 --- a/library/ttk/scale.tcl +++ b/library/ttk/scale.tcl @@ -39,7 +39,7 @@ proc ttk::scale::Press {w x y} { switch -glob -- [$w identify $x $y] { *track - *trough { - set inc [expr {([$w get $x $y] <= [$w get]) ? -1 : 1}] + set inc [expr {([$w get $x $y] <= [$w get]) ^ ([$w cget -from] > [$w cget -to]) ? -1 : 1}] ttk::Repeatedly Increment $w $inc } *slider { @@ -84,5 +84,8 @@ proc ttk::scale::Release {w x y} { proc ttk::scale::Increment {w delta} { if {![winfo exists $w]} return + if {([$w cget -from] > [$w cget -to])} { + set delta [expr {-$delta}] + } $w set [expr {[$w get] + $delta}] } |