mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 14:32:58 +02:00
A couple of meter orientation fixes
1) On startup if the capture meter is vertical and
the playback meter is horizontal, capture meter
would jump to horizontal if you start monitoring.
2) To cut down on meter orientation weirdness, the
orientation is now mirrored in both meters when
it changes.
If this is not a desired behavior then the only
option would be to have separate config file
settings for each meter. That means that the
orientation settings in meter preferences will
correspond to that meter only.
Let me know if this is what is wanted.
This commit is contained in:
@@ -192,10 +192,18 @@ void MeterToolBar::OnSize( wxSizeEvent & WXUNUSED(event) )
|
||||
if( mRecordMeter ) {
|
||||
mRecordMeter->SetStyle(bHorizontal ? Meter::HorizontalStereo : Meter::VerticalStereo);
|
||||
mRecordMeter->SetMinSize( wxSize( width, height ));
|
||||
Meter *play = mProject->GetPlaybackMeter();
|
||||
if( play ) {
|
||||
play->SetStyle(bHorizontal ? Meter::HorizontalStereo : Meter::VerticalStereo);
|
||||
}
|
||||
}
|
||||
if( mPlayMeter ) {
|
||||
mPlayMeter->SetStyle(bHorizontal ? Meter::HorizontalStereo : Meter::VerticalStereo);
|
||||
mPlayMeter->SetMinSize( wxSize( width, height ));
|
||||
Meter *record = mProject->GetCaptureMeter();
|
||||
if( record ) {
|
||||
record->SetStyle(bHorizontal ? Meter::HorizontalStereo : Meter::VerticalStereo);
|
||||
}
|
||||
mSizer->SetItemPosition( mPlayMeter, pos );
|
||||
}
|
||||
|
||||
@@ -207,12 +215,21 @@ bool MeterToolBar::Expose( bool show )
|
||||
{
|
||||
bool updated = false;
|
||||
if( show ) {
|
||||
Meter *meter;
|
||||
if( mPlayMeter ) {
|
||||
mProject->SetPlaybackMeter( mPlayMeter );
|
||||
meter = mProject->GetCaptureMeter();
|
||||
if( meter ) {
|
||||
meter->SetStyle( mPlayMeter->GetStyle() );
|
||||
}
|
||||
}
|
||||
|
||||
if( mRecordMeter ) {
|
||||
mProject->SetCaptureMeter( mRecordMeter );
|
||||
meter = mProject->GetPlaybackMeter();
|
||||
if( meter ) {
|
||||
meter->SetStyle( mRecordMeter->GetStyle() );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( mPlayMeter && mProject->GetPlaybackMeter() == mPlayMeter ) {
|
||||
|
||||
@@ -66,8 +66,8 @@ enum
|
||||
TransportBarID,
|
||||
ToolsBarID,
|
||||
MeterBarID,
|
||||
RecordMeterBarID,
|
||||
PlayMeterBarID,
|
||||
PlayMeterBarID, // RecorderMeterBarID should be after PlayMeterBarID
|
||||
RecordMeterBarID, // to ensure proper meter style setup during initialization
|
||||
MixerBarID,
|
||||
EditBarID,
|
||||
TranscriptionBarID,
|
||||
|
||||
Reference in New Issue
Block a user