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

oldstable
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,7 +1570,22 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
drawRect->left += 4;
drawRect->top += 4;
drawRect->right -= 4;
drawRect->bottom -= 1;
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
{