diff options
author | hobbs <hobbs> | 2004-05-03 19:36:56 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-05-03 19:36:56 (GMT) |
commit | d66f7502ce2620122989a792e11a537ed95efe0e (patch) | |
tree | 8e88776b87a5d18bdb07b165c0790ab8aff2b92a | |
parent | 08881c06b61f00f43b4a19eaa4aee75c99cf5ac7 (diff) | |
download | tk-d66f7502ce2620122989a792e11a537ed95efe0e.zip tk-d66f7502ce2620122989a792e11a537ed95efe0e.tar.gz tk-d66f7502ce2620122989a792e11a537ed95efe0e.tar.bz2 |
* library/panedwindow.tcl (MarkSash): call DragSash to stop sash
jump when B1 is pressed and released without moving. [Bug #932155]
Make the panedwindow -opaqueresize option work as per the docs.
[Bug #778893]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | library/panedwindow.tcl | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2004-05-03 Jeff Hobbs <jeffh@ActiveState.com> + * library/panedwindow.tcl (MarkSash): call DragSash to stop sash + jump when B1 is pressed and released without moving. [Bug #932155] + Make the panedwindow -opaqueresize option work as per the docs. + [Bug #778893] + * tests/panedwindow.test: panedwindow-25.1 * generic/tkPanedWindow.c (Unlink): clean up -before/-after refs to a slave when removing it. [Bug #928413] (griffin) diff --git a/library/panedwindow.tcl b/library/panedwindow.tcl index 3298aba..d4abd73 100644 --- a/library/panedwindow.tcl +++ b/library/panedwindow.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk panedwindow widgets and # provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: panedwindow.tcl,v 1.6.2.1 2003/07/19 01:22:15 hobbs Exp $ +# RCS: @(#) $Id: panedwindow.tcl,v 1.6.2.2 2004/05/03 19:36:56 hobbs Exp $ # bind Panedwindow <Button-1> { ::tk::panedwindow::MarkSash %W %x %y 1 } @@ -35,6 +35,7 @@ namespace eval ::tk::panedwindow {} # None # proc ::tk::panedwindow::MarkSash {w x y proxy} { + if {[$w cget -opaqueresize]} { set proxy 0 } set what [$w identify $x $y] if { [llength $what] == 2 } { foreach {index which} $what break @@ -44,6 +45,8 @@ proc ::tk::panedwindow::MarkSash {w x y proxy} { foreach {sx sy} [$w sash coord $index] break set ::tk::Priv(dx) [expr {$sx-$x}] set ::tk::Priv(dy) [expr {$sy-$y}] + # Do this to init the proxy location + DragSash $w $x $y $proxy } } } @@ -61,6 +64,7 @@ proc ::tk::panedwindow::MarkSash {w x y proxy} { # Moves sash # proc ::tk::panedwindow::DragSash {w x y proxy} { + if {[$w cget -opaqueresize]} { set proxy 0 } if { [info exists ::tk::Priv(sash)] } { if {$proxy} { $w proxy place \ @@ -83,6 +87,7 @@ proc ::tk::panedwindow::DragSash {w x y proxy} { # Returns ... # proc ::tk::panedwindow::ReleaseSash {w proxy} { + if {[$w cget -opaqueresize]} { set proxy 0 } if { [info exists ::tk::Priv(sash)] } { if {$proxy} { foreach {x y} [$w proxy coord] break |