1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 23:33:50 +02:00

Fix drawing of focus rectangles in buttons, meters, sliders on Mac

This commit is contained in:
Paul Licameli
2016-06-24 23:48:03 -04:00
parent 6a4d6ceeda
commit fe509ed412
4 changed files with 17 additions and 5 deletions

View File

@@ -174,11 +174,20 @@ void AColor::DrawFocus(wxDC & dc, wxRect & rect)
x2 = rect.GetRight(),
y2 = rect.GetBottom();
#ifdef __WXMAC__
// Why must this be different?
// Otherwise nothing is visible if you do as for the
// other platforms.
dc.SetPen(wxPen(wxT("MEDIUM GREY"), 1, wxSOLID));
dc.SetLogicalFunction(wxCOPY);
#else
dc.SetPen(wxPen(wxT("MEDIUM GREY"), 0, wxSOLID));
// this seems to be closer than what Windows does than wxINVERT although
// I'm still not sure if it's correct
dc.SetLogicalFunction(wxAND_REVERSE);
#endif
wxCoord z;
for ( z = x1 + 1; z < x2; z += 2 )