… | |
… | |
27 | /*----------------------------------------------------------------------*/ |
27 | /*----------------------------------------------------------------------*/ |
28 | #if defined(RXVT_SCROLLBAR) |
28 | #if defined(RXVT_SCROLLBAR) |
29 | |
29 | |
30 | #define SHADOW_WIDTH 1 |
30 | #define SHADOW_WIDTH 1 |
31 | |
31 | |
32 | static void |
32 | static void |
33 | draw_shadow (rxvt_term *term, int x, int y, int w, int h) |
33 | draw_shadow (rxvt_term *term, int x, int y, int w, int h) |
34 | { |
34 | { |
35 | int shadow; |
35 | int shadow; |
36 | |
36 | |
37 | shadow = (w == 0 || h == 0) ? 1 : SHADOW_WIDTH; |
37 | shadow = (w == 0 || h == 0) ? 1 : SHADOW_WIDTH; |
38 | w += x - 1; |
38 | w += x - 1; |
39 | h += y - 1; |
39 | h += y - 1; |
|
|
40 | |
40 | for (; shadow-- > 0; x++, y++, w--, h--) |
41 | for (; shadow-- > 0; x++, y++, w--, h--) |
41 | { |
42 | { |
42 | XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, w, y); |
43 | XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, w, y); |
43 | XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, x, h); |
44 | XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, x, h); |
44 | XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, w, y + 1); |
45 | XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, w, y + 1); |
45 | XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, x + 1, h); |
46 | XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, x + 1, h); |
46 | } |
47 | } |
47 | } |
48 | } |
48 | |
49 | |
49 | /* draw triangular button with a shadow of 2 pixels */ |
50 | /* draw triangular button with a shadow of 2 pixels */ |
50 | static void |
51 | static void |
51 | draw_button (rxvt_term *term, int x, int y, int state, int dirn) |
52 | draw_button (rxvt_term *term, int x, int y, int state, int dirn) |
52 | { |
53 | { |