1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Tweak spacing in vertical rulers.

This is most relevant in MixerBoard.
This commit is contained in:
James Crook 2018-04-15 11:48:51 +01:00
parent c8a31324bc
commit 35d24bbed5

View File

@ -401,7 +401,7 @@ void Ruler::FindLinearTickSizes(double UPP)
// minor tick. We want to show numbers like "-48"
// in that space.
// If vertical, we don't need as much space.
double units = ((mOrientation == wxHORIZONTAL) ? 22 : 12) * fabs(UPP);
double units = ((mOrientation == wxHORIZONTAL) ? 22 : 16) * fabs(UPP);
mDigits = 0;
@ -1184,14 +1184,15 @@ void Ruler::Update(const TimeTrack* timetrack)// Envelope *speedEnv, long minSpe
step = floor(sg * warpedD / denom);
bool major = jj == 0;
Tick(i, sg * step * denom, major, !major);
if( !major && mMinorLabels[mNumMinor-1].lx < mLeft )
if( !major && mMinorLabels[mNumMinor-1].text.IsEmpty() ){
nDroppedMinorLabels++;
}
}
}
// If we've dropped minor labels through overcrowding, then don't show
// any of them. We're allowed though to drop ones which correspond to the
// major numbers.
if( nDroppedMinorLabels > mNumMajor )
if( nDroppedMinorLabels > (mNumMajor+ (mLabelEdges ? 2:0)) )
mNumMinor = 0;
}