1
0
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:
James Crook 2018-09-20 15:35:07 +01:00
parent ce31c371b9
commit 9a45c02002

View File

@ -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