mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-14 15:20:29 +02:00
Bug 1983 residual - A better fix for the residual.
The previous fix did not handle the case of the mixer toolbar being smaller than its minimum size. The new fix does, and the code is simpler.
This commit is contained in:
parent
ce31c371b9
commit
9a45c02002
@ -165,20 +165,21 @@ void MixerToolBar::UpdatePrefs()
|
||||
|
||||
// Show or hide the input slider based on whether it works
|
||||
mInputSlider->Enable(gAudioIO->InputMixerWorks());
|
||||
wxSize oldSize( GetSize() );
|
||||
|
||||
// Layout the toolbar
|
||||
Layout();
|
||||
|
||||
// This code is from before the mixer toolbar was resizable.
|
||||
// Now that it is resizable we trust the user to resize the mixer toolbar themselves.
|
||||
#if 0
|
||||
wxSize oldSize( GetSize() );
|
||||
// Layout the toolbar
|
||||
Layout();
|
||||
// Resize the toolbar to fit the contents
|
||||
//Fit();
|
||||
|
||||
// And make that size the minimum
|
||||
wxSize newMinSize( wxWindow::GetSizer()->GetMinSize() );
|
||||
SetMinSize( newMinSize );
|
||||
|
||||
// IF size must increase, do so.
|
||||
if( newMinSize.y > oldSize.y ){
|
||||
if( newMinSize.x > oldSize.x ){
|
||||
SetSize( newMinSize );
|
||||
// Notify someone that we've changed our size
|
||||
Updated();
|
||||
@ -186,6 +187,7 @@ void MixerToolBar::UpdatePrefs()
|
||||
// ELSE preserve original size.
|
||||
else
|
||||
SetSize( oldSize );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Set label to pull in language change
|
||||
|
Loading…
x
Reference in New Issue
Block a user