-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 107c5bc02910dbdd0956e86b0c427054c84a2ba7:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 107c5bc02910dbdd0956e86b0c427054c84a2ba7
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Tue Feb 19 17:49:16 2008 +0000

    Remove 'len' member of scrollBar_t and compute it on demand.

diff --git a/src/scrollbar-next.C b/src/scrollbar-next.C

index 2d2d60ba285a156559b2fa106399e8d7736f37eb..

index ..ea30cd71b1385b8e6c88ddaba1745cf0dc6b2696 100644

--- a/src/scrollbar-next.C
+++ b/src/scrollbar-next.C
@@ -266,17 +266,17 @@ scrollBar_t::show_next (int update)

       XFillRectangle (term->dpy, win, grayGC,
                       SB_LEFT_PADDING, top + SB_PADDING,
-                      SB_BUTTON_WIDTH, len);
+                      SB_BUTTON_WIDTH, bot - top);

       XCopyArea (term->dpy, dimple, win, whiteGC, 0, 0,
                  SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT,
                  (SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2,
                  top + SB_BEVEL_WIDTH_UPPER_LEFT +
-                 (len - SCROLLER_DIMPLE_HEIGHT) / 2);
+                 (bot - top - SCROLLER_DIMPLE_HEIGHT) / 2);

       drawBevel (this, SB_BUTTON_BEVEL_X,
                  top + SB_PADDING, SB_BUTTON_WIDTH,
-                 len);
+                 bot - top);
       drawBevel (this, SB_BUTTON_BEVEL_X,
                  height - SB_BUTTON_BOTH_HEIGHT, SB_BUTTON_WIDTH,
                  SB_BUTTON_HEIGHT);
diff --git a/src/scrollbar-plain.C b/src/scrollbar-plain.C

index f486dff2bb7788675744327a160932b24068f18b..

index ..4a264f1e6d9a85c591a93e536d3710df40846eff 100644

--- a/src/scrollbar-plain.C
+++ b/src/scrollbar-plain.C
@@ -62,7 +62,7 @@ scrollBar_t::show_plain (int update)

   /* scrollbar slider */
   XFillRectangle (term->dpy, win, pscrollbarGC,
-                  1 - xsb, top, sbwidth, len);
+                  1 - xsb, top, sbwidth, bot - top);

   return 1;
 }
diff --git a/src/scrollbar-rxvt.C b/src/scrollbar-rxvt.C

index 0c038023d63ec5a00e11afa86e89b91611e584a8..

index ..8573285a895c35e8d029fd43fad2ac45794e4d8a 100644

--- a/src/scrollbar-rxvt.C
+++ b/src/scrollbar-rxvt.C
@@ -208,14 +208,14 @@ scrollBar_t::show_rxvt (int update)

   XFillRectangle (term->dpy, win, scrollbarGC,
                   sbshadow, top, sbwidth,
-                  len);
+                  bot - top);

   if (sbshadow)
     /* trough shadow */
     draw_shadow (this, 0, 0, sbwidth + 2 * sbshadow, end + (sbwidth + 1) + sbshadow);

   /* shadow for scrollbar slider */
-  draw_shadow (this, sbshadow, top, sbwidth, len);
+  draw_shadow (this, sbshadow, top, sbwidth, bot - top);

   /* Redraw scrollbar arrows */
   draw_button (this, sbshadow, sbshadow, UP);
diff --git a/src/scrollbar-xterm.C b/src/scrollbar-xterm.C

index e6b4e087647943296901a7d129656c0cb2536559..

index ..7c745d3e320fd404f711b1f90d9718ae247a1e54 100644

--- a/src/scrollbar-xterm.C
+++ b/src/scrollbar-xterm.C
@@ -78,7 +78,7 @@ scrollBar_t::show_xterm (int update)

   /* scrollbar slider */
   XFillRectangle (term->dpy, win, xscrollbarGC,
-                  xsb + 1, top, sbwidth - 2, len);
+                  xsb + 1, top, sbwidth - 2, bot - top);

   XDrawLine (term->dpy, win, ShadowGC,
              xsb ? 0 : sbwidth, beg,
diff --git a/src/scrollbar.C b/src/scrollbar.C

index 92f0452e36a53c3274e830d5a3e69ab4664f8030..

index ..0dffa22fa4d7c4e557c2cc3708280aacdf762529 100644

--- a/src/scrollbar.C
+++ b/src/scrollbar.C
@@ -121,8 +121,7 @@ scrollBar_t::show (int refresh)
       int sb_size = (sb_bot - sb_top) * size ();

       top = beg + (sb_top * size ()) / sb_len;
-      len = sb_size / sb_len + min_height () + (sb_size % sb_len > 0);
-      bot = top + len;
+      bot = top + sb_size / sb_len + min_height () + (sb_size % sb_len > 0);
       /* no change */
       if (top == last_top
           && bot == last_bot
diff --git a/src/scrollbar.h b/src/scrollbar.h

index 803f399ab92e48278395a8333ff6bc8f66bf9ddf..

index ..8929e5d49ec822c8dc948e69a7ec333a53bcd8c2 100644

--- a/src/scrollbar.h
+++ b/src/scrollbar.h
@@ -60,7 +60,6 @@ struct scrollBar_t {
   int             last_bot;     /* scrollbar last bottom position           */
   int             last_top;     /* scrollbar last top position              */
   int             last_state;   /* scrollbar last state                     */
-  int             len;
   unsigned char   align;
   Window          win;
   Cursor          leftptr_cursor;

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 12:36:54 2024