mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 00:20:06 +02: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:
parent
a49cf61033
commit
44b191ff42
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user