XFillRectangle (term->dpy, win, grayGC,
SB_LEFT_PADDING, top + SB_PADDING,
- SB_BUTTON_WIDTH, len);
+ SB_BUTTON_WIDTH, bot - top);
XCopyArea (term->dpy, dimple, win, whiteGC, 0, 0,
SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT,
(SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2,
top + SB_BEVEL_WIDTH_UPPER_LEFT +
- (len - SCROLLER_DIMPLE_HEIGHT) / 2);
+ (bot - top - SCROLLER_DIMPLE_HEIGHT) / 2);
drawBevel (this, SB_BUTTON_BEVEL_X,
top + SB_PADDING, SB_BUTTON_WIDTH,
- len);
+ bot - top);
drawBevel (this, SB_BUTTON_BEVEL_X,
height - SB_BUTTON_BOTH_HEIGHT, SB_BUTTON_WIDTH,
SB_BUTTON_HEIGHT);
/* scrollbar slider */
XFillRectangle (term->dpy, win, pscrollbarGC,
- 1 - xsb, top, sbwidth, len);
+ 1 - xsb, top, sbwidth, bot - top);
return 1;
}
XFillRectangle (term->dpy, win, scrollbarGC,
sbshadow, top, sbwidth,
- len);
+ bot - top);
if (sbshadow)
/* trough shadow */
draw_shadow (this, 0, 0, sbwidth + 2 * sbshadow, end + (sbwidth + 1) + sbshadow);
/* shadow for scrollbar slider */
- draw_shadow (this, sbshadow, top, sbwidth, len);
+ draw_shadow (this, sbshadow, top, sbwidth, bot - top);
/* Redraw scrollbar arrows */
draw_button (this, sbshadow, sbshadow, UP);
/* scrollbar slider */
XFillRectangle (term->dpy, win, xscrollbarGC,
- xsb + 1, top, sbwidth - 2, len);
+ xsb + 1, top, sbwidth - 2, bot - top);
XDrawLine (term->dpy, win, ShadowGC,
xsb ? 0 : sbwidth, beg,
int sb_size = (sb_bot - sb_top) * size ();
top = beg + (sb_top * size ()) / sb_len;
- len = sb_size / sb_len + min_height () + (sb_size % sb_len > 0);
- bot = top + len;
+ bot = top + sb_size / sb_len + min_height () + (sb_size % sb_len > 0);
/* no change */
if (top == last_top
&& bot == last_bot
int last_bot; /* scrollbar last bottom position */
int last_top; /* scrollbar last top position */
int last_state; /* scrollbar last state */
- int len;
unsigned char align;
Window win;
Cursor leftptr_cursor;