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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user