When you have a one row tab component with two tabs for instance and you put another control like a button just right after the last tab on the area of the tab component, the button is erased by the painting of the tab whereas on windows it is not. this patch fixes that. That behavior and be seen on a real application : eMule. ChangeLog: * Only redraw the necessary area of the tab component and not the whole component like windows does. -- Maxime Bellengà <maxime.bellenge@laposte.net>
Index: wine/dlls/comctl32/tab.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/tab.c,v retrieving revision 1.85 diff -u -r1.85 tab.c --- wine/dlls/comctl32/tab.c 14 Oct 2003 01:16:16 -0000 1.85 +++ wine/dlls/comctl32/tab.c 14 Oct 2003 16:56:50 -0000 @@ -2334,36 +2334,41 @@ 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 */