ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/scrollbar.C
(Generate patch)

Comparing rxvt-unicode/src/scrollbar.C (file contents):
Revision 1.28 by root, Sat Dec 31 17:16:17 2005 UTC vs.
Revision 1.32 by root, Mon Jan 16 15:12:48 2006 UTC

148{ 148{
149 int ret = 0; 149 int ret = 0;
150#ifdef HAVE_SCROLLBARS 150#ifdef HAVE_SCROLLBARS
151 int top, bot, len, adj; 151 int top, bot, len, adj;
152 152
153 if (!scrollbar_visible ()) 153 if (!scrollBar.state)
154 return 0; 154 return 0;
155 155
156 if (update) 156 if (update)
157 { 157 {
158 top = nsaved - view_start; 158 top = view_start - top_row;
159 bot = top + (nrow - 1); 159 bot = top + (nrow - 1);
160 len = max (nsaved + (nrow - 1), 1); 160 len = max (nrow - 1 - top_row, 1);
161 adj = (((bot - top) * scrollbar_size ()) % len) > 0 ? 1 : 0; 161 adj = (((bot - top) * scrollbar_size ()) % len) > 0 ? 1 : 0;
162 162
163 scrollBar.top = (scrollBar.beg + (top * scrollbar_size ()) / len); 163 scrollBar.top = (scrollBar.beg + (top * scrollbar_size ()) / len);
164 scrollbar_len = ((bot - top) * scrollbar_size ()) / len + 164 scrollbar_len = ((bot - top) * scrollbar_size ()) / len +
165 scrollbar_minheight () + adj; 165 scrollbar_minheight () + adj;
229 229
230 if (style != R_SB_NEXT) /* dishonour request - for now */ 230 if (style != R_SB_NEXT) /* dishonour request - for now */
231 if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM) 231 if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM)
232 width = min (i, SB_WIDTH_MAXIMUM); 232 width = min (i, SB_WIDTH_MAXIMUM);
233 233
234# if defined(RXVT_SCROLLBAR) 234# ifdef RXVT_SCROLLBAR
235 if (! OPTION (Opt_scrollBar_floating) && style == R_SB_RXVT) 235 if (! OPTION (Opt_scrollBar_floating) && style == R_SB_RXVT)
236 sb_shadow = SHADOW; 236 sb_shadow = 2;
237# endif 237# endif
238 238
239 scrollBar.style = style; 239 scrollBar.style = style;
240 scrollBar.width = width; 240 scrollBar.width = width;
241 241

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines