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 ...@@ -253,7 +253,6 @@ typedef struct tagLISTVIEW_INFO
COLORREF clrBk; COLORREF clrBk;
COLORREF clrText; COLORREF clrText;
COLORREF clrTextBk; COLORREF clrTextBk;
COLORREF clrTextBkDefault;
HIMAGELIST himlNormal; HIMAGELIST himlNormal;
HIMAGELIST himlSmall; HIMAGELIST himlSmall;
HIMAGELIST himlState; HIMAGELIST himlState;
...@@ -966,9 +965,7 @@ static void prepaint_setup (LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpn ...@@ -966,9 +965,7 @@ static void prepaint_setup (LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpn
if (lpnmlvcd->clrTextBk != CLR_NONE) if (lpnmlvcd->clrTextBk != CLR_NONE)
{ {
SetBkMode(hdc, OPAQUE); SetBkMode(hdc, OPAQUE);
if (lpnmlvcd->clrTextBk == CLR_DEFAULT) if (lpnmlvcd->clrTextBk != CLR_DEFAULT)
SetBkColor(hdc, infoPtr->clrTextBkDefault);
else
SetBkColor(hdc,lpnmlvcd->clrTextBk); SetBkColor(hdc,lpnmlvcd->clrTextBk);
} }
else else
...@@ -4036,7 +4033,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D ...@@ -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) static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
{ {
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
COLORREF oldTextColor, oldClrTextBk, oldClrText; COLORREF oldTextColor, oldBkColor, oldClrTextBk, oldClrText;
NMLVCUSTOMDRAW nmlvcd; NMLVCUSTOMDRAW nmlvcd;
HFONT hOldFont; HFONT hOldFont;
DWORD cdmode; DWORD cdmode;
...@@ -4051,7 +4048,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc) ...@@ -4051,7 +4048,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc)
/* save dc values we're gonna trash while drawing */ /* save dc values we're gonna trash while drawing */
hOldFont = SelectObject(hdc, infoPtr->hFont); hOldFont = SelectObject(hdc, infoPtr->hFont);
oldBkMode = GetBkMode(hdc); oldBkMode = GetBkMode(hdc);
infoPtr->clrTextBkDefault = GetBkColor(hdc); oldBkColor = GetBkColor(hdc);
oldTextColor = GetTextColor(hdc); oldTextColor = GetTextColor(hdc);
oldClrTextBk = infoPtr->clrTextBk; oldClrTextBk = infoPtr->clrTextBk;
...@@ -4111,7 +4108,7 @@ enddraw: ...@@ -4111,7 +4108,7 @@ enddraw:
SelectObject(hdc, hOldFont); SelectObject(hdc, hOldFont);
SetBkMode(hdc, oldBkMode); SetBkMode(hdc, oldBkMode);
SetBkColor(hdc, infoPtr->clrTextBkDefault); SetBkColor(hdc, oldBkColor);
SetTextColor(hdc, oldTextColor); SetTextColor(hdc, oldTextColor);
infoPtr->bIsDrawing = FALSE; infoPtr->bIsDrawing = FALSE;
} }
......
...@@ -624,11 +624,11 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) ...@@ -624,11 +624,11 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
return CDRF_NOTIFYSUBITEMDRAW; return CDRF_NOTIFYSUBITEMDRAW;
case CDDS_ITEMPREPAINT | CDDS_SUBITEM: case CDDS_ITEMPREPAINT | CDDS_SUBITEM:
clr = GetBkColor(nmlvcd->nmcd.hdc); clr = GetBkColor(nmlvcd->nmcd.hdc);
todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr); ok(clr == c0ffee, "clr=%.8x\n", clr);
return CDRF_NOTIFYPOSTPAINT; return CDRF_NOTIFYPOSTPAINT;
case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM: case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM:
clr = GetBkColor(nmlvcd->nmcd.hdc); 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;
} }
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