Commit 0fa33cad authored by Jon Griffiths's avatar Jon Griffiths Committed by Alexandre Julliard

Draw +/- correctly for large icon sizes.

parent fc1f31a9
......@@ -2319,18 +2319,6 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
HBRUSH hbr = CreateSolidBrush(infoPtr->clrBk);
HBRUSH hbrOld = SelectObject(hdc, hbr);
/* FIXME: Native actually draws:
*
* xxx
* X x
* xxx xxx xxxxxxx
* x x or x x
* xxx xxx xxxxxxx
* x x
* xxx
*
* This looks a lot better when the icon size is increased.
*/
Rectangle(hdc, centerx - rectsize - 1, centery - rectsize - 1,
centerx + rectsize + 2, centery + rectsize + 2);
......@@ -2340,6 +2328,8 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
SelectObject(hdc, hOldPen);
DeleteObject(hNewPen);
if (height < 16 || width < 16)
{
MoveToEx(hdc, centerx - plussize + 1, centery, NULL);
LineTo(hdc, centerx + plussize, centery);
......@@ -2349,6 +2339,20 @@ TREEVIEW_DrawItemLines(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
LineTo(hdc, centerx, centery + plussize);
}
}
else
{
Rectangle(hdc, centerx - plussize + 1, centery - 1,
centerx + plussize, centery + 2);
if (!(item->state & TVIS_EXPANDED))
{
Rectangle(hdc, centerx - 1, centery - plussize + 1,
centerx + 2, centery + plussize);
SetPixel(hdc, centerx - 1, centery, infoPtr->clrBk);
SetPixel(hdc, centerx + 1, centery, infoPtr->clrBk);
}
}
}
}
}
......
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