Improve appearance of wxTreeCtrl with wxTR_ROW_LINES in dark mode

Make the lines colour less bright to avoid having too high contrast
between the lines and the background, notably in dark mode under macOS.

See #19116.
This commit is contained in:
Daniel Kulp
2021-08-25 23:21:52 +02:00
committed by Vadim Zeitlin
parent 2a92a0a516
commit 696f582d3e

View File

@@ -2816,10 +2816,7 @@ wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem *item,
if (HasFlag(wxTR_ROW_LINES))
{
// if the background colour is white, choose a
// contrasting color for the lines
dc.SetPen(*((GetBackgroundColour() == *wxWHITE)
? wxMEDIUM_GREY_PEN : wxWHITE_PEN));
dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
dc.DrawLine(0, y_top, 10000, y_top);
dc.DrawLine(0, y, 10000, y);
}