[haiku-commits] r35353 - haiku/trunk/src/apps/activitymonitor

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 31 Jan 2010 02:03:43 +0100 (CET)

Author: stpere
Date: 2010-01-31 02:03:43 +0100 (Sun, 31 Jan 2010)
New Revision: 35353
Changeset: http://dev.haiku-os.org/changeset/35353/haiku
Ticket: http://dev.haiku-os.org/ticket/3319

Modified:
   haiku/trunk/src/apps/activitymonitor/ActivityView.cpp
Log:
ActivityMonitor: Add a 7px margin (when necessary) to the legend to avoid 
having the dragger overlaps the labels.

Fixing ticket #3319.


Modified: haiku/trunk/src/apps/activitymonitor/ActivityView.cpp
===================================================================
--- haiku/trunk/src/apps/activitymonitor/ActivityView.cpp       2010-01-31 
01:03:06 UTC (rev 35352)
+++ haiku/trunk/src/apps/activitymonitor/ActivityView.cpp       2010-01-31 
01:03:43 UTC (rev 35353)
@@ -1239,8 +1239,11 @@
        int32 boldMargin = Parent()
                && (Parent()->Flags() & B_DRAW_ON_CHILDREN) != 0 ? 2 : 0;
 
+       int32 draggerMargin = (fSources.CountItems() % 2) != 0 ? 0 : 7;
+
        return rows * (4 + ceilf(fontHeight.ascent)
-               + ceilf(fontHeight.descent) + ceilf(fontHeight.leading)) + 
boldMargin;
+               + ceilf(fontHeight.descent) + ceilf(fontHeight.leading)) + 
boldMargin
+               + draggerMargin;
 }
 
 


Other related posts:

  • » [haiku-commits] r35353 - haiku/trunk/src/apps/activitymonitor - stpere