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:
committed by
Vadim Zeitlin
parent
2a92a0a516
commit
696f582d3e
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user