summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScroll.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-12-18 19:33:10 (GMT)
committerjenglish <jenglish@flightlab.com>2006-12-18 19:33:10 (GMT)
commitfb835826dd21c44784539b40e590866ffb89bd93 (patch)
treeb0a6aa116ab0a8f8f7eefc79d7816eb5eb6e5c58 /generic/ttk/ttkScroll.c
parent16cde6f4aaf0d168843b71218b3b76cad1f1da4c (diff)
downloadtk-fb835826dd21c44784539b40e590866ffb89bd93.zip
tk-fb835826dd21c44784539b40e590866ffb89bd93.tar.gz
tk-fb835826dd21c44784539b40e590866ffb89bd93.tar.bz2
Big batch of ttk::treeview improvements:
Added column '-stretch' and '-minwidth' options. Improved column drag and resize behavior. Added horizontal scrolling [#1518650]. Row height and child indent specifiable on Treeview style. Decreased default row height, no default -padding. Use correct heading height [#1163349]. Apply tag settings to tree item as well as to data columns [NOTE: 'tag configure' still buggy]. Fix off-by-one condition when moving nodes forward [#1618142] Prevent overscroll ([#1173434]) Treeview style settings specified separately in each theme. Added disclosure triangle element in aqua theme.
Diffstat (limited to 'generic/ttk/ttkScroll.c')
-rw-r--r--generic/ttk/ttkScroll.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index a7fa1f4..ab1f1e7 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScroll.c,v 1.4 2006/11/13 00:22:40 jenglish Exp $
+/* $Id: ttkScroll.c,v 1.5 2006/12/18 19:33:13 jenglish Exp $
*
* Copyright 2004, Joe English
*
@@ -144,6 +144,12 @@ void TtkScrolled(ScrollHandle h, int first, int last, int total)
total = 1;
}
+ if (last > total) {
+ first -= (last - total);
+ if (first < 0) first = 0;
+ last = total;
+ }
+
if (s->first != first || s->last != last || s->total != total
|| (h->flags & SCROLL_UPDATE_REQUIRED))
{