fixed wrong usage of ConstrainClippingRegion() introduced by myself a couple months ago
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15374 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -174,32 +174,30 @@ void _BMCMenuBar_::AttachedToWindow()
|
||||
//------------------------------------------------------------------------------
|
||||
void _BMCMenuBar_::Draw(BRect updateRect)
|
||||
{
|
||||
// TODO: The commented code locks up the
|
||||
// window thread.
|
||||
// draw the right and bottom line here in a darker tint
|
||||
BRegion oldClipping;
|
||||
GetClippingRegion(&oldClipping);
|
||||
|
||||
BRect bounds(Bounds());
|
||||
bounds.right -= 2.0;
|
||||
bounds.bottom -= 1.0;
|
||||
bounds = bounds & updateRect;
|
||||
|
||||
// prevent the original BMenuBar's Draw from
|
||||
// drawing in those parts
|
||||
BRegion clipping(bounds);
|
||||
ConstrainClippingRegion(&clipping);
|
||||
|
||||
BMenuBar::Draw(updateRect);
|
||||
|
||||
ConstrainClippingRegion(NULL);
|
||||
|
||||
bounds.right += 2.0;
|
||||
bounds.bottom += 1.0;
|
||||
ConstrainClippingRegion(&oldClipping);
|
||||
//BRect bounds(Bounds());
|
||||
|
||||
SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_4_TINT));
|
||||
StrokeLine(BPoint(bounds.left, bounds.bottom),
|
||||
BPoint(bounds.right, bounds.bottom));
|
||||
StrokeLine(BPoint(bounds.right, bounds.bottom - 1),
|
||||
BPoint(bounds.right, bounds.top));
|
||||
SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT));
|
||||
StrokeLine(BPoint(bounds.right - 1, bounds.bottom - 2),
|
||||
StrokeLine(BPoint(bounds.right - 1, bounds.bottom - 1),
|
||||
BPoint(bounds.right - 1, bounds.top + 1));
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -777,7 +777,7 @@ load_menu_settings(menu_info &into)
|
||||
be_plain_font->GetFamilyAndStyle(&into.f_family, &into.f_style);
|
||||
into.background_color = ui_color(B_MENU_BACKGROUND_COLOR);
|
||||
into.separator = 0;
|
||||
into.click_to_open = false;
|
||||
into.click_to_open = true;
|
||||
into.triggers_always_shown = false;
|
||||
|
||||
return B_OK;
|
||||
|
||||
@@ -948,7 +948,7 @@ BWindow::DispatchMessage(BMessage *msg, BHandler *target)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "***PANIC: BW: Can't find view with ID: %ld !***\n", token);
|
||||
fprintf(stderr, "B_VIEW_RESIZED ***PANIC: BW: Can't find view with ID: %ld !***\n", token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user