-- 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: 86d571f3765a3c7a00393ee1a9d7b057df7693d6:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 86d571f3765a3c7a00393ee1a9d7b057df7693d6
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Sun Feb 17 11:37:21 2008 +0000

    Make scrollbar_TotalWidth a method of scrollBar_t.

diff --git a/src/main.C b/src/main.C

index 9effb70b9a0a5f0ea2f427a34952487ae5b914af..

index ..b1cf9b71deb3825ebd48be7b9acc820eaba1b734 100644

--- a/src/main.C
+++ b/src/main.C
@@ -599,7 +599,7 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)

   if (scrollBar.state)
     {
-      sb_w = scrollbar_TotalWidth ();
+      sb_w = scrollBar.total_width ();
       szHint.base_width += sb_w;

       if (!option (Opt_scrollBar_right))
@@ -987,7 +987,7 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in
         {
           XMoveResizeWindow (dpy, scrollBar.win,
                              window_sb_x, 0,
-                             scrollbar_TotalWidth (), szHint.height);
+                             scrollBar.total_width (), szHint.height);
           resize_scrollbar ();
         }

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

index c676cbf79fddaa65faf6bbad65a5ad56ece81b19..

index ..514ce4985075f99469feea28d66208934ef84c37 100644

--- a/src/scrollbar.C
+++ b/src/scrollbar.C
@@ -112,7 +112,7 @@ rxvt_term::resize_scrollbar ()
       scrollBar.win = XCreateSimpleWindow (dpy,
                                            parent[0],
                                            window_sb_x, 0,
-                                           scrollbar_TotalWidth (),
+                                           scrollBar.total_width (),
                                            szHint.height,
                                            0,
                                            pix_colors[Color_fg],
diff --git a/src/scrollbar.h b/src/scrollbar.h

index 386d879cf348714a303e786cb6749bdd57461acc..

index ..41720416dc3463b3ece7dce59daf8a439db17394 100644

--- a/src/scrollbar.h
+++ b/src/scrollbar.h
@@ -54,10 +54,12 @@ struct scrollBar_t {
       return y > end;
     return false;
   }
+  unsigned total_width ()
+  {
+    return width + shadow * 2;
+  }
 };

-#define scrollbar_TotalWidth()  (scrollBar.width + scrollBar.shadow * 2)
-
 #define SCROLLNEXT_MINHEIGHT    SB_THUMB_MIN_HEIGHT
 #define SCROLLRXVT_MINHEIGHT    10

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

-- Response ended

-- Page fetched on Sun Jun 2 11:44:39 2024