--- rxvt-unicode/src/scrollbar-next.C 2011/09/01 08:11:27 1.32 +++ rxvt-unicode/src/scrollbar-next.C 2014/05/30 19:40:23 1.34 @@ -10,7 +10,7 @@ * * 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 - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -148,7 +148,7 @@ scrollBar_t::init_next () { XGCValues gcvalue; - XColor xcol; + rxvt_color color; Pixmap stipple; unsigned long light, dark; @@ -162,20 +162,23 @@ whiteGC = XCreateGC (term->dpy, win, GCForeground | GCGraphicsExposures, &gcvalue); - xcol.red = 0xaeba; - xcol.green = 0xaaaa; - xcol.blue = 0xaeba; - xcol.pixel = term->pix_colors_focused[Color_scroll]; - light = gcvalue.foreground = xcol.pixel; + light = term->pix_colors_focused[Color_scroll]; +#if 0 + //color used by rxvt + if (color.set (term, rgba (0xaeba, 0xaaaa, 0xaeba))) + light = color; +#endif + gcvalue.foreground = light; grayGC = XCreateGC (term->dpy, win, GCForeground | GCGraphicsExposures, &gcvalue); - xcol.red = 0x51aa; - xcol.green = 0x5555; - xcol.blue = 0x5144; - //if (!rXAllocColor (&xcol, "dark gray"))//TODO//D// - xcol.pixel = term->pix_colors_focused[Color_Grey25]; - dark = gcvalue.foreground = xcol.pixel; + dark = term->pix_colors_focused[Color_Grey25]; +#if 0 + //color used by rxvt + if (color.set (term, rgba (0x51aa, 0x5555, 0x5144))) + dark = color; +#endif + gcvalue.foreground = dark; darkGC = XCreateGC (term->dpy, win, GCForeground | GCGraphicsExposures, &gcvalue); @@ -188,8 +191,6 @@ gcvalue.fill_style = FillOpaqueStippled; gcvalue.stipple = stipple; - /* XSetWindowBackground (dpy, scrollBar.win, pix_colors_focused[Color_Red]); */ - stippleGC = XCreateGC (term->dpy, win, GCForeground | GCBackground | GCStipple | GCFillStyle | GCGraphicsExposures, &gcvalue);