emacs-diffs
[Top][All Lists]
Advanced

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

master 8f391ae26e: Fix min size reporting of style pane in Haiku font di


From: Po Lu
Subject: master 8f391ae26e: Fix min size reporting of style pane in Haiku font dialogs
Date: Thu, 5 May 2022 02:35:03 -0400 (EDT)

branch: master
commit 8f391ae26eab6654360f621acaeb2bc0935e3d32
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix min size reporting of style pane in Haiku font dialogs
    
    * src/haiku_support.cc (class DualLayoutView):
    (MinSize): Implement correctly with both views.
---
 src/haiku_support.cc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 33acaacaaf..0ab31bc98d 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -2575,6 +2575,20 @@ class DualLayoutView : public BView
     BView::FrameResized (new_width, new_height);
   }
 
+  /* This is called by the BSplitView.  */
+  BSize
+  MinSize (void)
+  {
+    float width, height;
+    BSize size_1;
+
+    size_1 = view_1->MinSize ();
+    view_2->GetPreferredSize (&width, &height);
+
+    return BSize (std::max (size_1.width, width),
+                 std::max (size_1.height, height));
+  }
+
 public:
   DualLayoutView (BScrollView *first, BView *second) : BView (NULL, 
B_FRAME_EVENTS),
                                                       view_1 (first),



reply via email to

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