diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-28 11:22:05 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-28 11:22:05 (GMT) |
commit | 7c89d3e3b39591353404839f423738644998d7d5 (patch) | |
tree | 47fe7ae5a9e1ed4466f072ec7a5697c6a23b0862 /library | |
parent | 30bc8c2155ec0958653757ef097c0c19986943f3 (diff) | |
parent | b2131c84660d210c0da2bdf89fb44c9d67fb224e (diff) | |
download | tk-7c89d3e3b39591353404839f423738644998d7d5.zip tk-7c89d3e3b39591353404839f423738644998d7d5.tar.gz tk-7c89d3e3b39591353404839f423738644998d7d5.tar.bz2 |
Bug [2501278]: ttk::scale keyboard binding problem
FossilOrigin-Name: 57f9af7736bfaa207bf39c4ea79bff6869628d6f
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 69b9dd8..62c85bf 100644 --- a/library/ttk/scale.tcl +++ b/library/ttk/scale.tcl @@ -42,7 +42,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 { @@ -87,5 +87,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}] } |