1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 09:20:16 +01:00

FindTrackRect omits all margins; better screen reader focus rects...

... Formerly it was outside of the yellow focus at the right side.  Now it
follows the yellow consistently on four sides.

The constant dx in TrackPanelAx::GetLocation might be adjusted.

No change of behavior is intended at other uses of FindTrackRect
This commit is contained in:
Paul Licameli
2017-06-04 10:55:46 -04:00
parent 134c1ff47a
commit c38efc1fcd
4 changed files with 33 additions and 17 deletions

View File

@@ -306,7 +306,11 @@ wxAccStatus TrackPanelAx::GetLocation( wxRect& rect, int elementId )
return wxACC_FAIL;
}
rect = mTrackPanel->FindTrackRect( t, true );
rect = mTrackPanel->FindTrackRect( t, false );
// Inflate the screen reader's rectangle so it overpaints Audacity's own
// yellow focus rectangle.
const int dx = 2;
rect.Inflate(dx, dx);
}
rect.SetPosition( mTrackPanel->GetParent()->ClientToScreen( rect.GetPosition() ) );