Skip to content
Snippets Groups Projects
Commit 8147ee10 authored by Maxime Bellengé's avatar Maxime Bellengé Committed by Alexandre Julliard
Browse files

Only redraw the necessary area of the tab component and not the whole

component like windows does.
parent 47d64a04
No related branches found
No related tags found
No related merge requests found
......@@ -2334,36 +2334,41 @@ static void TAB_InvalidateTabArea(
RECT clientRect, r;
DWORD lStyle = GetWindowLongA(hwnd, GWL_STYLE);
INT lastRow = infoPtr->uNumRows - 1;
RECT rect;
if (lastRow < 0) return;
GetClientRect(hwnd, &clientRect);
TAB_InternalGetItemRect(hwnd, infoPtr, infoPtr->uNumItem-1 , &rect, NULL);
if ((lStyle & TCS_BOTTOM) && !(lStyle & TCS_VERTICAL))
{
clientRect.top = clientRect.bottom -
infoPtr->tabHeight -
lastRow * (infoPtr->tabHeight - 2) -
((lStyle & TCS_BUTTONS) ? lastRow * BUTTON_SPACINGY : 0) - 3;
clientRect.right = clientRect.left + rect.right + 2 * SELECTED_TAB_OFFSET;
}
else if((lStyle & TCS_BOTTOM) && (lStyle & TCS_VERTICAL))
{
clientRect.left = clientRect.right - infoPtr->tabHeight -
lastRow * (infoPtr->tabHeight - 2) -
((lStyle & TCS_BUTTONS) ? lastRow * BUTTON_SPACINGY : 0) - 2;
clientRect.bottom = clientRect.top + rect.bottom + 2 * SELECTED_TAB_OFFSET;
}
else if(lStyle & TCS_VERTICAL)
{
clientRect.right = clientRect.left + infoPtr->tabHeight +
lastRow * (infoPtr->tabHeight - 2) -
((lStyle & TCS_BUTTONS) ? lastRow * BUTTON_SPACINGY : 0) + 2;
clientRect.bottom = clientRect.top + rect.bottom + 2 * SELECTED_TAB_OFFSET;
}
else
{
clientRect.bottom = clientRect.top + infoPtr->tabHeight +
lastRow * (infoPtr->tabHeight - 2) +
((lStyle & TCS_BUTTONS) ? lastRow * BUTTON_SPACINGY : 0) + 2;
clientRect.right = clientRect.left + rect.right + 2 * SELECTED_TAB_OFFSET;
}
/* Punch out the updown control */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment