From 27231d807a1b3a179b8456630fb4b16a24dd701c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 21 Jan 2015 17:48:59 +0100 Subject: [PATCH] ActivityMonitor: changed full legend width behavior. * Only use the full width if there is only a single item, otherwise I think it's more confusing than helpful. --- src/apps/activitymonitor/ActivityView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/activitymonitor/ActivityView.cpp b/src/apps/activitymonitor/ActivityView.cpp index 10cdc1c269..2e9a405092 100644 --- a/src/apps/activitymonitor/ActivityView.cpp +++ b/src/apps/activitymonitor/ActivityView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2008-2015, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ @@ -1272,8 +1272,8 @@ ActivityView::_LegendFrameAt(BRect frame, int32 index) const int32 column = index & 1; int32 row = index / 2; if (column == 0) { - // The last item, if it is on the first column, can use the full width. - if (index < fSources.CountItems() - 1) + // Use the full width if there is only one item + if (fSources.CountItems() != 1) frame.right = frame.left + floorf(frame.Width() / 2) - 5; } else frame.left = frame.right - floorf(frame.Width() / 2) + 5;