mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-05 22:21:15 +01:00
Bug 2622 - Track name overlay is opaque
Somewhere along the line the 'rect' passed in to DrawTrackName()changed from being for the track area to being for the name area. Accordingly the track rect now has to be explicitly accessed from the track to get its height, from which the transparency is then derived.
This commit is contained in:
@@ -1069,7 +1069,7 @@ void DrawTrackName(
|
||||
// Tracks more than kTranslucentHeight will have maximum translucency for shields.
|
||||
const int kOpaqueHeight = 44;
|
||||
const int kTranslucentHeight = 124;
|
||||
int h = rect.GetHeight();
|
||||
int h = TrackView::Get( *t ).GetHeight();
|
||||
// f codes the opacity as a number between 0.0 and 1.0
|
||||
float f = wxClip((h-kOpaqueHeight)/(float)(kTranslucentHeight-kOpaqueHeight),0.0,1.0);
|
||||
// kOpaque is the shield's alpha for tracks that are not tall
|
||||
|
||||
Reference in New Issue
Block a user