[haiku-commits] haiku: hrev44124 - src/kits/tracker

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 7 May 2012 00:44:12 +0200 (CEST)

hrev44124 adds 1 changeset to branch 'master'
old head: aa7d070732908c3ae1d89dd71cefc6f11a719900
new head: 4dad975dda68795852e3dea27642061776a241e6

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

4dad975: Tracker: Consider extra column margin in PoseView::Extent()
  
  In List Mode, consider the extra margin added to the right of
  the last column when computing the Extent of the PoseView. This
  was causing the ResizeToFit to resize a bit too small.
  
  Fixes #4318

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

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

Revision:    hrev44124
Commit:      4dad975dda68795852e3dea27642061776a241e6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4dad975
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Sun May  6 22:41:31 2012 UTC

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

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

1 file changed, 5 insertions(+), 3 deletions(-)
src/kits/tracker/PoseView.cpp |    8 +++++---

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

diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index d3acf33..07bacbb 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -8282,6 +8282,9 @@ BPoseView::RecalcExtent()
 }
 
 
+const int32 kRoomForLine = 2;
+
+
 BRect
 BPoseView::Extent() const
 {
@@ -8291,7 +8294,8 @@ BPoseView::Extent() const
                BColumn *column = fColumnList->LastItem();
                if (column) {
                        rect.left = rect.top = 0;
-                       rect.right = column->Offset() + column->Width();
+                       rect.right = column->Offset() + column->Width()
+                               + kTitleColumnRightExtraMargin - kRoomForLine / 
2.0f;
                        rect.bottom = fListElemHeight * 
CurrentPoseList()->CountItems();
                } else
                        rect.Set(LeftTop().x, LeftTop().y, LeftTop().x, 
LeftTop().y);
@@ -8940,8 +8944,6 @@ BPoseView::ResizeColumnToWidest(BColumn *column)
 }
 
 
-const int32 kRoomForLine = 2;
-
 BPoint
 BPoseView::ResizeColumn(BColumn *column, float newSize,
        float *lastLineDrawPos,


Other related posts:

  • » [haiku-commits] haiku: hrev44124 - src/kits/tracker - stpere