--- rxvt-unicode/src/scrollbar-rxvt.C 2007/05/01 21:30:01 1.30 +++ rxvt-unicode/src/scrollbar-rxvt.C 2008/02/06 01:29:19 1.35 @@ -149,13 +149,22 @@ int rxvt_term::scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len) { - int sbshadow = sb_shadow; + int sbshadow = scrollBar.shadow; int sbwidth = (int)scrollBar.width; + int state; if ((scrollBar.init & R_SB_RXVT) == 0) { + XGCValues gcvalue; + scrollBar.init |= R_SB_RXVT; + gcvalue.foreground = pix_colors[Color_topShadow]; + topShadowGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); + gcvalue.foreground = pix_colors[Color_bottomShadow]; + botShadowGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); + gcvalue.foreground = pix_colors[ (depth <= 2 ? Color_fg : Color_scroll)]; + scrollbarGC = XCreateGC (dpy, vt, GCForeground, &gcvalue); if (sbshadow) { XSetWindowBackground (dpy, scrollBar.win, pix_colors_focused[Color_trough]); @@ -209,11 +218,13 @@ draw_shadow (this, sbshadow, scrollBar.top, sbwidth, scrollbar_len); /* Redraw scrollbar arrows */ - draw_button (this, sbshadow, sbshadow, (scrollbar_isUp () ? -1 : +1), UP); - draw_button (this, sbshadow, scrollBar.end + 1, (scrollbar_isDn () ? -1 : +1), DN); + state = scrollBar.state == STATE_UP ? -1 : +1; + draw_button (this, sbshadow, sbshadow, state, UP); + state = scrollBar.state == STATE_DOWN ? -1 : +1; + draw_button (this, sbshadow, scrollBar.end + 1, state, DN); return 1; } -#endif /* RXVT_SCROLLBAR */ +#endif /* RXVT_SCROLLBAR */ /*----------------------- end-of-file (C source) -----------------------*/