28
28
#if defined(PLAIN_SCROLLBAR)
31
rxvt_term::scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len)
31
scrollBar_t::show_plain (int update)
34
int sbwidth = scrollBar.width - 1;
34
int sbwidth = width - 1;
36
if ((scrollBar.init & R_SB_PLAIN) == 0)
36
if ((init & R_SB_PLAIN) == 0)
40
scrollBar.init |= R_SB_PLAIN;
41
gcvalue.foreground = pix_colors_focused[Color_scroll];
41
gcvalue.foreground = term->pix_colors_focused[Color_scroll];
43
pscrollbarGC = XCreateGC (dpy, scrollBar.win, GCForeground, &gcvalue);
43
pscrollbarGC = XCreateGC (term->dpy, win, GCForeground, &gcvalue);
46
xsb = option (Opt_scrollBar_right) ? 1 : 0;
46
xsb = term->option (Opt_scrollBar_right) ? 1 : 0;
50
if (last_top < scrollBar.top)
51
XClearArea (dpy, scrollBar.win,
52
scrollBar.shadow, last_top,
53
sbwidth + 1, scrollBar.top - last_top, False);
51
XClearArea (term->dpy, win,
53
sbwidth + 1, top - last_top, False);
55
if (scrollBar.bot < last_bot)
56
XClearArea (dpy, scrollBar.win,
57
scrollBar.shadow, scrollBar.bot,
58
sbwidth + 1, last_bot - scrollBar.bot, False);
56
XClearArea (term->dpy, win,
58
sbwidth + 1, last_bot - bot, False);
61
XClearWindow (dpy, scrollBar.win);
61
XClearWindow (term->dpy, win);
63
63
/* scrollbar slider */
64
XFillRectangle (dpy, scrollBar.win, pscrollbarGC,
65
1 - xsb, scrollBar.top, sbwidth, scrollbar_len);
64
XFillRectangle (term->dpy, win, pscrollbarGC,
65
1 - xsb, top, sbwidth, bot - top);