]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix min size reporting of style pane in Haiku font dialogs
authorPo Lu <luangruo@yahoo.com>
Thu, 5 May 2022 06:33:49 +0000 (06:33 +0000)
committerPo Lu <luangruo@yahoo.com>
Thu, 5 May 2022 06:33:59 +0000 (06:33 +0000)
* src/haiku_support.cc (class DualLayoutView):
(MinSize): Implement correctly with both views.

src/haiku_support.cc

index 33acaacaaf4b3bd1f9f2cb5add917c494828a849..0ab31bc98dc50401b8b86c5ef6790f60193f48e6 100644 (file)
@@ -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),