1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-28 15:38:48 +01:00

Bug 1699 - Selected keyboard prefs line unreadable in 3 of 4 themes on Mac

The focus rect in key prefs is not very helpful.  It was setting the background colour too,
but that is now using system colours again.
This commit is contained in:
James Crook
2017-07-22 11:05:08 +01:00
parent 904ddbf2a3
commit de0cc3ecff
3 changed files with 27 additions and 26 deletions

View File

@@ -1080,15 +1080,22 @@ KeyView::OnDrawBackground(wxDC & dc, const wxRect & rect, size_t line) const
if (FindFocus() == this)
{
// Focused lines get highlighted background
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)));
AColor::DrawFocus(dc, r);
dc.DrawRectangle(r);
// and they also get a dotted focus rect. This could just be left out.
// The focus rect does very little for us, as it is the same size as the
// rectangle itself. Consequently for themes that have black text it
// disappears. But on HiContrast you do get a dotted green border which
// may have some utility.
AColor::DrawFocus(dc, r);
}
else
{
// Non focused lines get a light background
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
dc.DrawRectangle(r);
}
}