From 005e1e3073fd64a5af2b35a839b10efefc5a490a Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 31 Jan 2010 01:03:43 +0000 Subject: [PATCH] ActivityMonitor: Add a 7px margin (when necessary) to the legend to avoid having the dragger overlaps the labels. Fixing ticket #3319. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35353 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/activitymonitor/ActivityView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/activitymonitor/ActivityView.cpp b/src/apps/activitymonitor/ActivityView.cpp index c258202fbc..d5679d3f14 100644 --- a/src/apps/activitymonitor/ActivityView.cpp +++ b/src/apps/activitymonitor/ActivityView.cpp @@ -1239,8 +1239,11 @@ ActivityView::_LegendHeight() const 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; }