emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0470ef007f: Treat scroll bar information consistently on Haiku


From: Po Lu
Subject: master 0470ef007f: Treat scroll bar information consistently on Haiku
Date: Sun, 27 Feb 2022 20:17:56 -0500 (EST)

branch: master
commit 0470ef007f268f19cad8c0c786559453c38fdde3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Treat scroll bar information consistently on Haiku
    
    * src/haiku_support.cc (class EmacsScrollBar): New field `info'.
    (EmacsScrollBar): Obtain scroll bar info on initialization.
    (ButtonRegionFor): Use that information instead.
---
 src/haiku_support.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 12990b3378..20d04163fc 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -1561,6 +1561,7 @@ public:
   bool horizontal;
   enum haiku_scroll_bar_part current_part;
   float old_value;
+  scroll_bar_info info;
 
   EmacsScrollBar (int x, int y, int x1, int y1, bool horizontal_p) :
     BScrollBar (BRect (x, y, x1, y1), NULL, NULL, 0, 0, horizontal_p ?
@@ -1569,6 +1570,7 @@ public:
     BView *vw = (BView *) this;
     vw->SetResizingMode (B_FOLLOW_NONE);
     horizontal = horizontal_p;
+    get_scroll_bar_info (&info);
   }
 
   void
@@ -1624,9 +1626,6 @@ public:
     BRect bounds;
     BRect rect;
     float button_size;
-    scroll_bar_info info;
-
-    get_scroll_bar_info (&info);
 
     bounds = Bounds ();
     bounds.InsetBy (0.0, 0.0);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]