repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 515df453d5be488fbd712f66234f08f364b8a46c: path_to: revision_to:
commit 515df453d5be488fbd712f66234f08f364b8a46c Author: Marc LehmannDate: Mon Jan 16 18:10:07 2006 +0000 *** empty log message *** diff --git a/src/scrollbar-rxvt.C b/src/scrollbar-rxvt.C
--- a/src/scrollbar-rxvt.C
+++ b/src/scrollbar-rxvt.C
@@ -29,22 +29,23 @@
#define SHADOW_WIDTH 1
-static void
+static void
draw_shadow (rxvt_term *term, int x, int y, int w, int h)
-{
+{
int shadow;
-
+
shadow = (w == 0 || h == 0) ? 1 : SHADOW_WIDTH;
w += x - 1;
h += y - 1;
+
for (; shadow-- > 0; x++, y++, w--, h--)
- {
+ {
XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, w, y);
XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, x, h);
XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, w, y + 1);
XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, x + 1, h);
- }
-}
+ }
+}
/* draw triangular button with a shadow of 2 pixels */
static void
-----END OF PAGE-----