[haiku-commits] haiku: hrev54491 - src/kits/tracker/infowindow

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 5 Aug 2020 08:42:17 -0400 (EDT)

hrev54491 adds 1 changeset to branch 'master'
old head: 2c09e0dc7f7c8401c3ee131f65147b2ddb4b8279
new head: 9027ca04e27113786c296cfeb5b923e6cebe24a3
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=9027ca04e271+%5E2c09e0dc7f7c

----------------------------------------------------------------------------

9027ca04e271: Tracker: fix infowindow resizing
  
  Fixes #16053

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54491
Commit:      9027ca04e27113786c296cfeb5b923e6cebe24a3
URL:         https://git.haiku-os.org/haiku/commit/?id=9027ca04e271
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Wed Aug  5 12:40:06 2020 UTC

Ticket:      https://dev.haiku-os.org/ticket/16053

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 1 deletion(-)
src/kits/tracker/infowindow/AttributesView.cpp      | 10 ++++++++++
src/kits/tracker/infowindow/FilePermissionsView.cpp |  2 +-

----------------------------------------------------------------------------

diff --git a/src/kits/tracker/infowindow/AttributesView.cpp 
b/src/kits/tracker/infowindow/AttributesView.cpp
index 9af7bd96f1..d19e8d9e0e 100644
--- a/src/kits/tracker/infowindow/AttributesView.cpp
+++ b/src/kits/tracker/infowindow/AttributesView.cpp
@@ -472,4 +472,14 @@ AttributesView::AttributesView(Model* model)
                }
                fListView->AddRow(row);
        }
+
+       int32 rows = fListView->CountRows(NULL);
+       if (rows < 5)
+               rows = 5;
+       BRow* first = fListView->RowAt(0, NULL);
+       if (first != NULL) {
+               float height = first->Height() * (rows + 2);
+               SetExplicitMaxSize(BSize(B_SIZE_UNSET, height));
+       }
+
 }
diff --git a/src/kits/tracker/infowindow/FilePermissionsView.cpp 
b/src/kits/tracker/infowindow/FilePermissionsView.cpp
index 925b219aee..ddecbc5a63 100644
--- a/src/kits/tracker/infowindow/FilePermissionsView.cpp
+++ b/src/kits/tracker/infowindow/FilePermissionsView.cpp
@@ -184,7 +184,7 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* 
model)
        SetLayout(groupLayout);
 
        BLayoutBuilder::Group<>(groupLayout)
-               .AddGroup(B_HORIZONTAL)
+               .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING, 0.0f)
                        .SetInsets(B_USE_DEFAULT_SPACING)
                        .AddGrid(B_USE_SMALL_SPACING, B_USE_SMALL_SPACING)
                                .Add(ownerRightLabel, 1, 0)


Other related posts:

  • » [haiku-commits] haiku: hrev54491 - src/kits/tracker/infowindow - Adrien Destugues