From: Vladislav Timonin timoninvlad@yandex.ru
An improvement of 5f0dcf79185941c4faff35d1cc9c758160f3a27d, which, depending on theme, had an issue with drawing the top border clipped inside the header. --- dlls/comctl32/listview.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 7c394d60273..07bea8574b6 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -10712,15 +10712,15 @@ static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) if (region != (HRGN)1) CombineRgn (cliprgn, cliprgn, region, RGN_AND);
- OffsetRect(&r, -r.left, -r.top); + dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW | DCX_INTERSECTRGN); if (infoPtr->hwndHeader && LISTVIEW_IsHeaderEnabled(infoPtr)) { GetWindowRect(infoPtr->hwndHeader, &window_rect); - r.top = min(r.bottom, r.top + window_rect.bottom - window_rect.top); + OffsetRect(&window_rect, -r.left, -r.top); + ExcludeClipRect(dc, window_rect.left, window_rect.top, window_rect.right, window_rect.bottom); }
- dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW|DCX_INTERSECTRGN); - + OffsetRect(&r, -r.left, -r.top); if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0)) DrawThemeParentBackground(infoPtr->hwndSelf, dc, &r); DrawThemeBackground (theme, dc, 0, 0, &r, 0);