From 97d1235cef30c0445af4986d84671b33acb41ee9 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 23 Oct 2012 20:35:09 -0400 Subject: [PATCH] Fill in the return key rect with the background color. This eliminates artifacts that are seen when the key is drawn while being dragged. --- src/preferences/keymap/KeyboardLayoutView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index 574e1b0672..467e6a303b 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -672,6 +672,10 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, region.Exclude(bottomLeft); view->ConstrainClippingRegion(®ion); + // Fill in the rect with the background color + SetHighColor(background); + FillRect(rect); + // draw the button background BRect bgRect = rect.InsetByCopy(2, 2); be_control_look->DrawButtonBackground(view, bgRect, updateRect,