summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2003-07-19 01:20:17 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2003-07-19 01:20:17 (GMT)
commit79112144fcce38a88f01259df00357bdf0076ad2 (patch)
tree8fe0148a049f8cba5d3dfcc85e9a83f2536ba191
parent0a6a4524bf5256634003ffa661d7cba6a11d2ebb (diff)
downloadtk-79112144fcce38a88f01259df00357bdf0076ad2.zip
tk-79112144fcce38a88f01259df00357bdf0076ad2.tar.gz
tk-79112144fcce38a88f01259df00357bdf0076ad2.tar.bz2
* win/tkWinCursor.c: Applied misplaced Tcl RFE 700799 to provide
the windows hand cursor where available.
-rw-r--r--ChangeLog7
-rw-r--r--library/scale.tcl14
2 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b91c313..2e91c36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-19 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * library/scale.tcl: Fix for bug 706765 to correctly handle the
+ -sliderrelief option while moving the thumb.
+
2003-07-18 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for
@@ -7,7 +12,7 @@
* win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide
consistency between unix and windows -cursor option.
-
+
2003-07-18 Jeff Hobbs <jeffh@ActiveState.com>
* win/tkWinDialog.c: doubled the TK_MULTI_MAX_PATH value to ~10K.
diff --git a/library/scale.tcl b/library/scale.tcl
index 76c8cb2..e06bcf8 100644
--- a/library/scale.tcl
+++ b/library/scale.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk scale widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: scale.tcl,v 1.9 2002/02/26 01:07:08 hobbs Exp $
+# RCS: @(#) $Id: scale.tcl,v 1.10 2003/07/19 01:20:17 patthoyts Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -139,6 +139,10 @@ proc ::tk::ScaleButtonDown {w x y} {
variable ::tk::Priv
set Priv(dragging) 0
set el [$w identify $x $y]
+
+ # save the relief
+ set Priv($w,relief) [$w cget -sliderrelief]
+
if {[string equal $el "trough1"]} {
ScaleIncrement $w up little initial
} elseif {[string equal $el "trough2"]} {
@@ -149,7 +153,10 @@ proc ::tk::ScaleButtonDown {w x y} {
set coords [$w coords]
set Priv(deltaX) [expr {$x - [lindex $coords 0]}]
set Priv(deltaY) [expr {$y - [lindex $coords 1]}]
- $w configure -sliderrelief sunken
+ switch -exact -- $Priv($w,relief) {
+ "raised" { $w configure -sliderrelief sunken }
+ "ridge" { $w configure -sliderrelief groove }
+ }
}
}
@@ -181,7 +188,8 @@ proc ::tk::ScaleDrag {w x y} {
proc ::tk::ScaleEndDrag {w} {
variable ::tk::Priv
set Priv(dragging) 0
- $w configure -sliderrelief raised
+ $w configure -sliderrelief $Priv($w,relief)
+ unset Priv($w,relief)
}
# ::tk::ScaleIncrement --