comctl32: header: Don't try to draw items outside the clipping rect.
This commit is contained in:
parent
64e5779c16
commit
b8da6f2751
|
@ -466,8 +466,10 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||||
|
|
||||||
x = rect.left;
|
x = rect.left;
|
||||||
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
|
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
|
||||||
x = HEADER_DrawItem (hwnd, hdc, HEADER_OrderToIndex(hwnd,i),
|
int idx = HEADER_OrderToIndex(hwnd,i);
|
||||||
infoPtr->iHotItem == i);
|
if (RectVisible(hdc, &infoPtr->items[idx].rect))
|
||||||
|
HEADER_DrawItem (hwnd, hdc, idx, infoPtr->iHotItem == i);
|
||||||
|
x = infoPtr->items[idx].rect.right;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((x <= rect.right) && (infoPtr->uNumItem > 0)) {
|
if ((x <= rect.right) && (infoPtr->uNumItem > 0)) {
|
||||||
|
|
Loading…
Reference in New Issue