mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 06:03:13 +02:00
Compute default WaveTrack height analogously to NoteTrack...
... though in fact this comes to the same 150 pixels as before, given the present layout table.
This commit is contained in:
parent
f0c149b890
commit
84b5fd6075
@ -9791,6 +9791,16 @@ unsigned TrackInfo::DefaultNoteTrackHeight()
|
||||
return (unsigned) std::max( needed, (int) Track::DefaultHeight );
|
||||
}
|
||||
|
||||
unsigned TrackInfo::DefaultWaveTrackHeight()
|
||||
{
|
||||
int needed =
|
||||
kTopMargin + kBottomMargin +
|
||||
totalTCPLines( waveTrackTCPLines ) +
|
||||
totalTCPLines( commonTrackTCPBottomLines ) -
|
||||
kTrackInfoSliderExtra;
|
||||
return (unsigned) std::max( needed, (int) Track::DefaultHeight );
|
||||
}
|
||||
|
||||
LWSlider * TrackInfo::GainSlider(WaveTrack *t, bool captured) const
|
||||
{
|
||||
wxPoint topLeft{
|
||||
|
@ -119,6 +119,7 @@ private:
|
||||
|
||||
public:
|
||||
static unsigned DefaultNoteTrackHeight();
|
||||
static unsigned DefaultWaveTrackHeight();
|
||||
|
||||
LWSlider * GainSlider(WaveTrack *t, bool captured = false) const;
|
||||
LWSlider * PanSlider(WaveTrack *t, bool captured = false) const;
|
||||
|
@ -59,6 +59,8 @@ Track classes.
|
||||
|
||||
#include "Experimental.h"
|
||||
|
||||
#include "TrackPanel.h" // for TrackInfo
|
||||
|
||||
using std::max;
|
||||
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
@ -113,6 +115,8 @@ WaveTrack::WaveTrack(const std::shared_ptr<DirManager> &projDirManager, sampleFo
|
||||
mLastScaleType = -1;
|
||||
mLastdBRange = -1;
|
||||
mAutoSaveIdent = 0;
|
||||
|
||||
SetHeight( TrackInfo::DefaultWaveTrackHeight() );
|
||||
}
|
||||
|
||||
WaveTrack::WaveTrack(const WaveTrack &orig):
|
||||
|
Loading…
x
Reference in New Issue
Block a user