--- rxvt-unicode/src/scrollbar-rxvt.C 2006/02/02 18:04:46 1.27 +++ rxvt-unicode/src/scrollbar-rxvt.C 2007/12/31 15:45:29 1.34 @@ -1,10 +1,10 @@ -/*--------------------------------*-C-*---------------------------------* +/*----------------------------------------------------------------------* * File: scrollbar-rxvt.C *----------------------------------------------------------------------* * * Copyright (c) 1997,1998 mj olesen * Copyright (c) 1999-2001 Geoff Wing - * Copyright (c) 2004 Marc Lehmann + * Copyright (c) 2004-2006 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -149,13 +149,21 @@ 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; 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]); @@ -187,7 +195,7 @@ { int xofs; - if (OPTION (Opt_scrollBar_right)) + if (option (Opt_scrollBar_right)) xofs = 0; else xofs = sbshadow ? sbwidth : sbwidth - 1; @@ -214,6 +222,6 @@ return 1; } -#endif /* RXVT_SCROLLBAR */ +#endif /* RXVT_SCROLLBAR */ /*----------------------- end-of-file (C source) -----------------------*/