From a12bf7d47b99eba1319ce8092e3f5599996dd441 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Wed, 17 Oct 2012 21:11:24 -0400 Subject: [PATCH] Clipping region is preserved between Draw Button calls. Remove the code that resets the clipping region. However, the enter button still doesn't draw correctly, the trick it used before is not working with the change from the last commit. --- src/preferences/keymap/KeyboardLayoutView.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index a65b7c5579..815fe723ac 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -625,9 +625,6 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, be_control_look->DrawButtonFrame(view, rect, updateRect, 4.0f, 4.0f, 0.0f, 0.0f, base, background, pressed ? BControlLook::B_ACTIVATED : 0); - - view->ConstrainClippingRegion(®ion); - be_control_look->DrawButtonBackground(view, rect, updateRect, 4.0f, 4.0f, 0.0f, 0.0f, base, pressed ? BControlLook::B_ACTIVATED : 0); @@ -635,8 +632,6 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, rect.left = missingRect.right; _GetAbbreviatedKeyLabelIfNeeded(view, rect, key, text, sizeof(text)); - view->ConstrainClippingRegion(®ion); - be_control_look->DrawLabel(view, text, rect, updateRect, base, 0, BAlignment(B_ALIGN_CENTER, B_ALIGN_MIDDLE)); @@ -652,9 +647,6 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, 0.0f, 0.0f, 4.0f, 0.0f, base, background, pressed ? BControlLook::B_ACTIVATED : 0, BControlLook::B_LEFT_BORDER | BControlLook::B_BOTTOM_BORDER); - - view->ConstrainClippingRegion(®ion); - be_control_look->DrawButtonBackground(view, rect, updateRect, 0.0f, 0.0f, 4.0f, 0.0f, base, pressed ? BControlLook::B_ACTIVATED : 0, @@ -675,9 +667,6 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, pressed ? BControlLook::B_ACTIVATED : 0, BControlLook::B_LEFT_BORDER | BControlLook::B_RIGHT_BORDER | BControlLook::B_BOTTOM_BORDER); - - view->ConstrainClippingRegion(®ion); - be_control_look->DrawButtonBackground(view, rect, updateRect, 0.0f, 0.0f, 4.0f, 4.0f, base, pressed ? BControlLook::B_ACTIVATED : 0,