[haiku-commits] r40772 - haiku/trunk/src/apps/diskusage

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 2 Mar 2011 01:22:24 +0100 (CET)

Author: stpere
Date: 2011-03-02 01:22:24 +0100 (Wed, 02 Mar 2011)
New Revision: 40772
Changeset: http://dev.haiku-os.org/changeset/40772

Modified:
   haiku/trunk/src/apps/diskusage/StatusView.cpp
   haiku/trunk/src/apps/diskusage/VolumeView.cpp
Log:
DiskUsage :

 * Reduce the height of the StatusView. It was way taller than necessary.


Modified: haiku/trunk/src/apps/diskusage/StatusView.cpp
===================================================================
--- haiku/trunk/src/apps/diskusage/StatusView.cpp       2011-03-01 22:27:28 UTC 
(rev 40771)
+++ haiku/trunk/src/apps/diskusage/StatusView.cpp       2011-03-02 00:22:24 UTC 
(rev 40772)
@@ -48,12 +48,15 @@
                999999);
 
        fCountView = new BStringView(NULL, kEmptyStr);
+       float width, height;
+       fCountView->GetPreferredSize(&width, &height);
        fCountView->SetExplicitMinSize(BSize(StringWidth(testLabel),
                B_SIZE_UNSET));
-       fCountView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
+       fCountView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, height));
 
        fPathView = new BStringView(NULL, kEmptyStr);
-       fPathView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET));
+       fPathView->GetPreferredSize(&width, &height);
+       fPathView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, height));
 
        fRefreshBtn = new BButton(NULL, B_TRANSLATE("Scan"),
                new BMessage(kBtnRescan));
@@ -71,11 +74,11 @@
 
        SetLayout(new BGroupLayout(B_VERTICAL));
 
-       AddChild(BLayoutBuilder::Group<>(B_HORIZONTAL)
-               .AddGroup(B_VERTICAL)
+       AddChild(BLayoutBuilder::Group<>(B_HORIZONTAL, 0)
+               .AddGroup(B_VERTICAL, 0)
                        .Add(fPathView)
                        .Add(divider1)
-                       .AddGroup(B_HORIZONTAL)
+                       .AddGroup(B_HORIZONTAL, 0)
                                .Add(fCountView)
                                .Add(divider2)
                                .Add(fSizeView)
@@ -83,7 +86,7 @@
                        .End()
                .AddStrut(kSmallHMargin)
                .Add(fRefreshBtn)
-               .SetInsets(kSmallHMargin, kSmallVMargin, kSmallVMargin, 
kSmallVMargin)
+               .SetInsets(kSmallVMargin, kSmallVMargin, kSmallVMargin, 
kSmallVMargin)
        );
 }
 

Modified: haiku/trunk/src/apps/diskusage/VolumeView.cpp
===================================================================
--- haiku/trunk/src/apps/diskusage/VolumeView.cpp       2011-03-01 22:27:28 UTC 
(rev 40771)
+++ haiku/trunk/src/apps/diskusage/VolumeView.cpp       2011-03-02 00:22:24 UTC 
(rev 40772)
@@ -39,7 +39,7 @@
 
        fStatusView = new StatusView();
 
-       AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
+       AddChild(BLayoutBuilder::Group<>(B_VERTICAL, 2)
                .Add(fPieView)
                .Add(fStatusView)
        );


Other related posts:

  • » [haiku-commits] r40772 - haiku/trunk/src/apps/diskusage - stpere