comctl32/treeview: Draw +/- signs with text color, not the lines' one.

+/- aren't affected by customdraw settings, only per control
set colors used.
This commit is contained in:
Nikolay Sivov 2009-12-12 12:32:54 +03:00 committed by Alexandre Julliard
parent b65a7a0052
commit 49dabfe31d
1 changed files with 16 additions and 9 deletions

View File

@ -2415,14 +2415,18 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
/* plussize = ceil(rectsize * 3/4) */ /* plussize = ceil(rectsize * 3/4) */
LONG plussize = (rectsize + 1) * 3 / 4; LONG plussize = (rectsize + 1) * 3 / 4;
HPEN hNewPen = CreatePen(PS_SOLID, 0, GETLINECOLOR(infoPtr->clrLine)); HPEN new_pen = CreatePen(PS_SOLID, 0, GETLINECOLOR(infoPtr->clrLine));
HPEN hOldPen = SelectObject(hdc, hNewPen); HPEN old_pen = SelectObject(hdc, new_pen);
Rectangle(hdc, centerx - rectsize - 1, centery - rectsize - 1, Rectangle(hdc, centerx - rectsize - 1, centery - rectsize - 1,
centerx + rectsize + 2, centery + rectsize + 2); centerx + rectsize + 2, centery + rectsize + 2);
SelectObject(hdc, hOldPen); SelectObject(hdc, old_pen);
DeleteObject(hNewPen); DeleteObject(new_pen);
/* draw +/- signs with current text color */
new_pen = CreatePen(PS_SOLID, 0, GETTXTCOLOR(infoPtr->clrText));
old_pen = SelectObject(hdc, new_pen);
if (height < 18 || width < 18) if (height < 18 || width < 18)
{ {
@ -2448,6 +2452,9 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
SetPixel(hdc, centerx + 1, centery, clrBk); SetPixel(hdc, centerx + 1, centery, clrBk);
} }
} }
SelectObject(hdc, old_pen);
DeleteObject(new_pen);
} }
} }
} }