From 0a95bea66d370459d9a0d7712f2dcbcdaa8eb00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 6 Dec 2005 16:56:31 +0000 Subject: [PATCH] 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 --- src/kits/interface/BMCPrivate.cpp | 16 +++++++--------- src/kits/interface/InterfaceDefs.cpp | 2 +- src/kits/interface/Window.cpp | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/kits/interface/BMCPrivate.cpp b/src/kits/interface/BMCPrivate.cpp index 0a0314cb5b..6a78dfd59e 100644 --- a/src/kits/interface/BMCPrivate.cpp +++ b/src/kits/interface/BMCPrivate.cpp @@ -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)); } //------------------------------------------------------------------------------ diff --git a/src/kits/interface/InterfaceDefs.cpp b/src/kits/interface/InterfaceDefs.cpp index f94d8806e7..bc8be3012d 100644 --- a/src/kits/interface/InterfaceDefs.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -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; diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index df4992303e..67597958d0 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -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); } } }