Commit 6a514819 authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

comctl32: Fix visual glitches with TVS_HASLINES.

parent 0f2f718d
......@@ -1730,6 +1730,11 @@ TREEVIEW_NaturalHeight(TREEVIEW_INFO *infoPtr)
height = tm.tmHeight + tm.tmExternalLeading + TVHEIGHT_FONT_ADJUST;
if (height < infoPtr->normalImageHeight)
height = infoPtr->normalImageHeight;
/* Round down, unless we support odd ("non even") heights. */
if (!(infoPtr->dwStyle & TVS_NONEVENHEIGHT))
height &= ~1;
return height;
}
......@@ -2325,14 +2330,16 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
HTREEITEM parent;
LOGBRUSH lb;
/*
* Get a dotted grey pen
*/
/* Get a dotted grey pen */
lb.lbStyle = BS_SOLID;
lb.lbColor = infoPtr->clrLine;
hNewPen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, NULL);
hOldPen = SelectObject(hdc, hNewPen);
/* Make sure the center is on a dot (using +2 instead
* of +1 gives us pixel-by-pixel compat with native) */
centery = (centery + 2) & ~1;
MoveToEx(hdc, item->stateOffset, centery, NULL);
LineTo(hdc, centerx - 1, centery);
......
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