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.20 by root, Tue Jan 3 02:43:33 2006 UTC vs.
Revision 1.21 by root, Mon Jan 16 15:12:48 2006 UTC

25#include "rxvt.h" /* NECESSARY */ 25#include "rxvt.h" /* NECESSARY */
26 26
27/*----------------------------------------------------------------------*/ 27/*----------------------------------------------------------------------*/
28#if defined(RXVT_SCROLLBAR) 28#if defined(RXVT_SCROLLBAR)
29 29
30#define DOUBLED 1
31
30/* draw triangular button with a shadow of MENU_SHADOW (1 or 2) pixels */ 32/* draw triangular button with a shadow of 2 pixels */
31void 33void
32rxvt_term::Draw_button (int x, int y, int state, int dirn) 34rxvt_term::Draw_button (int x, int y, int state, int dirn)
33{ 35{
34 unsigned int sz, sz2; 36 unsigned int sz, sz2;
35 XPoint pt[3]; 37 XPoint pt[3];
78 pt[1].x = x + sz2 - 1; 80 pt[1].x = x + sz2 - 1;
79 pt[1].y = y + (dirn == UP ? 0 : sz - 1); 81 pt[1].y = y + (dirn == UP ? 0 : sz - 1);
80 XDrawLine (display->display, scrollBar.win, top, 82 XDrawLine (display->display, scrollBar.win, top,
81 pt[0].x, pt[0].y, pt[1].x, pt[1].y); 83 pt[0].x, pt[0].y, pt[1].x, pt[1].y);
82 84
83#if (MENU_SHADOW > 1) 85#if DOUBLED
84 /* doubled */ 86 /* doubled */
85 pt[0].x++; 87 pt[0].x++;
86 88
87 if (dirn == UP) 89 if (dirn == UP)
88 { 90 {
96 } 98 }
97 99
98 XDrawLine (display->display, scrollBar.win, top, 100 XDrawLine (display->display, scrollBar.win, top,
99 pt[0].x, pt[0].y, pt[1].x, pt[1].y); 101 pt[0].x, pt[0].y, pt[1].x, pt[1].y);
100#endif 102#endif
103
101 /* draw shadow on right */ 104 /* draw shadow on right */
102 pt[1].x = x + sz - 1; 105 pt[1].x = x + sz - 1;
103 /* pt[2].x = x + sz2; */ 106 /* pt[2].x = x + sz2; */
104 pt[1].y = y + (dirn == UP ? sz - 1 : 0); 107 pt[1].y = y + (dirn == UP ? sz - 1 : 0);
105 pt[2].y = y + (dirn == UP ? 0 : sz - 1); 108 pt[2].y = y + (dirn == UP ? 0 : sz - 1);
106 XDrawLine (display->display, scrollBar.win, bot, 109 XDrawLine (display->display, scrollBar.win, bot,
107 pt[2].x, pt[2].y, pt[1].x, pt[1].y); 110 pt[2].x, pt[2].y, pt[1].x, pt[1].y);
108 111
109#if (MENU_SHADOW > 1) 112#if DOUBLED
110 /* doubled */ 113 /* doubled */
111 pt[1].x--; 114 pt[1].x--;
112 if (dirn == UP) 115 if (dirn == UP)
113 { 116 {
114 pt[2].y++; 117 pt[2].y++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines