--- rxvt-unicode/src/scrollbar-rxvt.C 2004/08/23 19:57:33 1.16 +++ rxvt-unicode/src/scrollbar-rxvt.C 2006/01/16 15:12:48 1.21 @@ -27,7 +27,9 @@ /*----------------------------------------------------------------------*/ #if defined(RXVT_SCROLLBAR) -/* draw triangular button with a shadow of SHADOW (1 or 2) pixels */ +#define DOUBLED 1 + +/* draw triangular button with a shadow of 2 pixels */ void rxvt_term::Draw_button (int x, int y, int state, int dirn) { @@ -80,9 +82,10 @@ XDrawLine (display->display, scrollBar.win, top, pt[0].x, pt[0].y, pt[1].x, pt[1].y); -#if (SHADOW > 1) +#if DOUBLED /* doubled */ pt[0].x++; + if (dirn == UP) { pt[0].y--; @@ -93,9 +96,11 @@ pt[0].y++; pt[1].y--; } + XDrawLine (display->display, scrollBar.win, top, pt[0].x, pt[0].y, pt[1].x, pt[1].y); #endif + /* draw shadow on right */ pt[1].x = x + sz - 1; /* pt[2].x = x + sz2; */ @@ -103,7 +108,8 @@ pt[2].y = y + (dirn == UP ? 0 : sz - 1); XDrawLine (display->display, scrollBar.win, bot, pt[2].x, pt[2].y, pt[1].x, pt[1].y); -#if (SHADOW > 1) + +#if DOUBLED /* doubled */ pt[1].x--; if (dirn == UP) @@ -131,6 +137,7 @@ if ((scrollBar.init & R_SB_RXVT) == 0) { scrollBar.init |= R_SB_RXVT; + if (sbshadow) { XSetWindowBackground (display->display, scrollBar.win, pix_colors_focused[Color_trough]); @@ -162,7 +169,7 @@ { int xofs; - if (options & Opt_scrollBar_right) + if (OPTION (Opt_scrollBar_right)) xofs = 0; else xofs = sbshadow ? sbwidth : sbwidth - 1; @@ -198,3 +205,4 @@ } #endif /* RXVT_SCROLLBAR */ /*----------------------- end-of-file (C source) -----------------------*/ +