Commit 18c41f71 authored by Mark Harmstone's avatar Mark Harmstone Committed by Alexandre Julliard

comctl32: Draw focus rect on themed pushbuttons.

parent dba0fe36
......@@ -122,6 +122,21 @@ static void PB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
HeapFree(GetProcessHeap(), 0, text);
}
if (focused)
{
MARGINS margins;
RECT focusRect = bgRect;
GetThemeMargins(theme, hDC, BP_PUSHBUTTON, state, TMT_CONTENTMARGINS, NULL, &margins);
focusRect.left += margins.cxLeftWidth;
focusRect.top += margins.cyTopHeight;
focusRect.right -= margins.cxRightWidth;
focusRect.bottom -= margins.cyBottomHeight;
DrawFocusRect( hDC, &focusRect );
}
if (hPrevFont) SelectObject(hDC, hPrevFont);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment