ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/scrollbar-rxvt.C
(Generate patch)

Comparing rxvt-unicode/src/scrollbar-rxvt.C (file contents):
Revision 1.40 by sf-exg, Tue Mar 30 10:31:07 2010 UTC vs.
Revision 1.43 by sf-exg, Thu Sep 1 08:11:27 2011 UTC

2 * File: scrollbar-rxvt.C 2 * File: scrollbar-rxvt.C
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * 4 *
5 * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> 5 * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
6 * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> 6 * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
7 * Copyright (c) 2004-2006 Marc Lehmann <pcg@goof.com> 7 * Copyright (c) 2004-2006 Marc Lehmann <schmorp@schmorp.de>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
58 Display *dpy = sb->term->dpy; 58 Display *dpy = sb->term->dpy;
59 59
60 sz = sb->width; 60 sz = sb->width;
61 sz2 = sz / 2; 61 sz2 = sz / 2;
62 62
63 if ((dirn == UP && sb->state == STATE_UP) 63 if ((dirn == UP && sb->state == SB_STATE_UP)
64 || (dirn == DN && sb->state == STATE_DOWN)) 64 || (dirn == DN && sb->state == SB_STATE_DOWN))
65 { 65 {
66 top = sb->botShadowGC; 66 top = sb->botShadowGC;
67 bot = sb->topShadowGC; 67 bot = sb->topShadowGC;
68 } 68 }
69 else 69 else
150int 150int
151scrollBar_t::show_rxvt (int update) 151scrollBar_t::show_rxvt (int update)
152{ 152{
153 int sbwidth = (int)width; 153 int sbwidth = (int)width;
154 154
155 if ((init & R_SB_RXVT) == 0) 155 if ((init & SB_STYLE_RXVT) == 0)
156 { 156 {
157 XGCValues gcvalue; 157 XGCValues gcvalue;
158 158
159 init |= R_SB_RXVT; 159 init |= SB_STYLE_RXVT;
160 160
161 gcvalue.foreground = term->pix_colors[Color_topShadow]; 161 gcvalue.foreground = term->pix_colors[Color_topShadow];
162 topShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue); 162 topShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue);
163 gcvalue.foreground = term->pix_colors[Color_bottomShadow]; 163 gcvalue.foreground = term->pix_colors[Color_bottomShadow];
164 botShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue); 164 botShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue);
165 gcvalue.foreground = term->pix_colors[ (term->depth <= 2 ? Color_fg : Color_scroll)]; 165 gcvalue.foreground = term->pix_colors[ (term->depth <= 2 ? Color_fg : Color_scroll)];
166 scrollbarGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue); 166 scrollbarGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue);
167 if (!term->option (Opt_scrollBar_floating)) 167 if (shadow)
168 { 168 {
169 shadow = SHADOW_WIDTH;
170 XSetWindowBackground (term->dpy, win, term->pix_colors_focused[Color_trough]); 169 XSetWindowBackground (term->dpy, win, term->pix_colors_focused[Color_trough]);
171 XClearWindow (term->dpy, win); 170 XClearWindow (term->dpy, win);
172 } 171 }
173 } 172 }
174 else 173 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines