comctl32/tab: Fix filled rectangle calculation for selected button on TCS_BUTTONS.

This commit is contained in:
Nikolay Sivov 2009-04-06 17:13:51 -04:00 committed by Alexandre Julliard
parent 59ae274ac3
commit 5ebc7ba72d
1 changed files with 16 additions and 1 deletions

View File

@ -1570,8 +1570,23 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
drawRect->left += 4;
drawRect->top += 4;
drawRect->right -= 4;
if (lStyle & TCS_VERTICAL)
{
if (!(lStyle & TCS_BOTTOM)) drawRect->right += 1;
drawRect->bottom -= 4;
}
else
{
if (lStyle & TCS_BOTTOM)
{
drawRect->top -= 2;
drawRect->bottom -= 4;
}
else
drawRect->bottom -= 1;
}
}
else
{
drawRect->left += 2;