-- cgit v0.12 From 8962bfa23f42567fd3e6ead0c1f2326b3472ca19 Mon Sep 17 00:00:00 2001 From: bll Date: Thu, 20 Aug 2020 22:50:13 +0000 Subject: Fix mouse bindings for scrollbars with graphical grip elements. --- library/ttk/scrollbar.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl index efcf3a1..e939426 100644 --- a/library/ttk/scrollbar.tcl +++ b/library/ttk/scrollbar.tcl @@ -67,6 +67,7 @@ proc ttk::scrollbar::Press {w x y} { *rightarrow { ttk::Repeatedly Scroll $w 1 units } + *grip - *thumb { set State(first) [lindex [$w get] 0] } @@ -89,7 +90,7 @@ proc ttk::scrollbar::Press {w x y} { proc ttk::scrollbar::Drag {w x y} { variable State if {![info exists State(first)]} { - # Initial buttonpress was not on the thumb, + # Initial buttonpress was not on the thumb, # or something screwy has happened. In either case, ignore: return; } @@ -112,6 +113,7 @@ proc ttk::scrollbar::Jump {w x y} { variable State switch -glob -- [$w identify $x $y] { + *grip - *thumb - *trough { set State(first) [$w fraction $x $y] -- cgit v0.12