Commit 08670ee7 authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

comctl32: Remove clrTextBkDefault member from LISTVIEW_INFO and fix (clrTextBk…

comctl32: Remove clrTextBkDefault member from LISTVIEW_INFO and fix (clrTextBk == CLR_DEFAULT) handling for custom drawing.
parent 8677069c
......@@ -253,7 +253,6 @@ typedef struct tagLISTVIEW_INFO
COLORREF clrBk;
COLORREF clrText;
COLORREF clrTextBk;
COLORREF clrTextBkDefault;
HIMAGELIST himlNormal;
HIMAGELIST himlSmall;
HIMAGELIST himlState;
......@@ -966,9 +965,7 @@ static void prepaint_setup (LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpn
if (lpnmlvcd->clrTextBk != CLR_NONE)
{
SetBkMode(hdc, OPAQUE);
if (lpnmlvcd->clrTextBk == CLR_DEFAULT)
SetBkColor(hdc, infoPtr->clrTextBkDefault);
else
if (lpnmlvcd->clrTextBk != CLR_DEFAULT)
SetBkColor(hdc,lpnmlvcd->clrTextBk);
}
else
......@@ -4036,7 +4033,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D
static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
{
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
COLORREF oldTextColor, oldClrTextBk, oldClrText;
COLORREF oldTextColor, oldBkColor, oldClrTextBk, oldClrText;
NMLVCUSTOMDRAW nmlvcd;
HFONT hOldFont;
DWORD cdmode;
......@@ -4051,7 +4048,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
/* save dc values we're gonna trash while drawing */
hOldFont = SelectObject(hdc, infoPtr->hFont);
oldBkMode = GetBkMode(hdc);
infoPtr->clrTextBkDefault = GetBkColor(hdc);
oldBkColor = GetBkColor(hdc);
oldTextColor = GetTextColor(hdc);
oldClrTextBk = infoPtr->clrTextBk;
......@@ -4111,7 +4108,7 @@ enddraw:
SelectObject(hdc, hOldFont);
SetBkMode(hdc, oldBkMode);
SetBkColor(hdc, infoPtr->clrTextBkDefault);
SetBkColor(hdc, oldBkColor);
SetTextColor(hdc, oldTextColor);
infoPtr->bIsDrawing = FALSE;
}
......
......@@ -624,11 +624,11 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
return CDRF_NOTIFYSUBITEMDRAW;
case CDDS_ITEMPREPAINT | CDDS_SUBITEM:
clr = GetBkColor(nmlvcd->nmcd.hdc);
todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr);
ok(clr == c0ffee, "clr=%.8x\n", clr);
return CDRF_NOTIFYPOSTPAINT;
case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM:
clr = GetBkColor(nmlvcd->nmcd.hdc);
todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr);
ok(clr == c0ffee, "clr=%.8x\n", clr);
return CDRF_DODEFAULT;
}
return CDRF_DODEFAULT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment