diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2013-01-11 05:57:45 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2013-01-11 05:57:45 +0100 |
commit | ec782c5f13fbcebe3b02106357c7daa0681a2b08 (patch) | |
tree | 89a2c74f4d1d5d84e1591987e64a526e3b4a8f92 /src/gtkutil.c | |
parent | eac4d08fb1864aa178cfa0037352f5a0a7a20597 (diff) |
Introduce scroll-bar-adjust-thumb-portion.
* xterm.c (scroll-bar-adjust-thumb-portion): New variable to
determine whether scroll bar thumb size should be adjusted or
not. Use variable for MOTIF.
* gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
GTK.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r-- | src/gtkutil.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6daf189f74..af845f69e6 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3795,13 +3795,17 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, adj = gtk_range_get_adjustment (GTK_RANGE (wscroll)); - /* We do the same as for MOTIF in xterm.c, assume 30 chars per line - rather than the real portion value. This makes the thumb less likely - to resize and that looks better. */ - portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; - /* When the thumb is at the bottom, position == whole. - So we need to increase `whole' to make space for the thumb. */ - whole += portion; + if (scroll_bar_adjust_thumb_portion_p) + { + /* We do the same as for MOTIF in xterm.c, use 30 chars per + line rather than the real portion value. This makes the + thumb less likely to resize and that looks better. */ + portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; + + /* When the thumb is at the bottom, position == whole. + So we need to increase `whole' to make space for the thumb. */ + whole += portion; + } if (whole <= 0) top = 0, shown = 1; |