Expand click rects when checking for close/collapse clicks.

This commit is contained in:
Alex Wilson
2012-04-01 11:54:21 +12:00
parent 710eb7410f
commit d19e651f97
+2 -2
View File
@@ -103,7 +103,7 @@ AppGroupView::Draw(BRect updateRect)
void
AppGroupView::MouseDown(BPoint point)
{
if (fCloseRect.Contains(point)) {
if (BRect(fCloseRect).InsetBySelf(-5, -5).Contains(point)) {
int32 children = fInfo.size();
for (int32 i = 0; i < children; i++) {
GetLayout()->RemoveView(fInfo[i]);
@@ -116,7 +116,7 @@ AppGroupView::MouseDown(BPoint point)
BMessage message(kRemoveGroupView);
message.AddPointer("view", this);
fParent->PostMessage(&message);
} else if (fCollapseRect.Contains(point)) {
} else if (BRect(fCollapseRect).InsetBySelf(-5, -5).Contains(point)) {
fCollapsed = !fCollapsed;
int32 children = fInfo.size();
if (fCollapsed) {