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

Comparing rxvt-unicode/src/scrollbar-next.C (file contents):
Revision 1.34 by sf-exg, Fri May 30 19:40:23 2014 UTC vs.
Revision 1.35 by sf-exg, Fri May 30 19:44:11 2014 UTC

238 238
239 if ((init & SB_STYLE_NEXT) == 0) 239 if ((init & SB_STYLE_NEXT) == 0)
240 { 240 {
241 init |= SB_STYLE_NEXT; 241 init |= SB_STYLE_NEXT;
242 init_next (); 242 init_next ();
243 last_has_sb = false;
243 } 244 }
244 245
245 if (term->top_row == 0 || !update) 246 bool has_sb = term->top_row;
247 int stipple_height = height - SB_PADDING;
248
249 if (has_sb)
250 stipple_height -= SB_BUTTON_TOTAL_HEIGHT;
251 else
252 stipple_height -= SB_PADDING;
253
254 if (has_sb != last_has_sb || !update)
246 { 255 {
256 last_has_sb = has_sb;
247 XFillRectangle (term->dpy, win, grayGC, 0, 0, 257 XFillRectangle (term->dpy, win, grayGC, 0, 0,
248 SB_WIDTH_NEXT + 1, height); 258 SB_WIDTH_NEXT + 1, height);
249 XDrawRectangle (term->dpy, win, blackGC, 0, 259 XDrawRectangle (term->dpy, win, blackGC, 0,
250 -SB_BORDER_WIDTH, SB_WIDTH_NEXT, 260 -SB_BORDER_WIDTH, SB_WIDTH_NEXT,
251 height + SB_BORDER_WIDTH); 261 height + SB_BORDER_WIDTH);
252 XFillRectangle (term->dpy, win, stippleGC, 262 XFillRectangle (term->dpy, win, stippleGC,
263 SB_LEFT_PADDING, SB_PADDING,
253 SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); 264 SB_BUTTON_WIDTH, stipple_height);
254 } 265 }
255 266
256 if (term->top_row) 267 if (term->top_row)
257 { 268 {
258 if (last_top < top || !update) 269 if (last_top < top || !update)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines