Skip to content
Snippets Groups Projects
Commit 9a45c020 authored by James Crook's avatar James Crook
Browse files

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.
parent ce31c371
No related branches found
No related tags found
No related merge requests found
...@@ -165,20 +165,21 @@ void MixerToolBar::UpdatePrefs() ...@@ -165,20 +165,21 @@ void MixerToolBar::UpdatePrefs()
// Show or hide the input slider based on whether it works // Show or hide the input slider based on whether it works
mInputSlider->Enable(gAudioIO->InputMixerWorks()); mInputSlider->Enable(gAudioIO->InputMixerWorks());
wxSize oldSize( GetSize() ); 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 the toolbar
Layout(); Layout();
// Resize the toolbar to fit the contents // Resize the toolbar to fit the contents
//Fit(); //Fit();
// And make that size the minimum // And make that size the minimum
wxSize newMinSize( wxWindow::GetSizer()->GetMinSize() ); wxSize newMinSize( wxWindow::GetSizer()->GetMinSize() );
SetMinSize( newMinSize ); SetMinSize( newMinSize );
// IF size must increase, do so. // IF size must increase, do so.
if( newMinSize.y > oldSize.y ){ if( newMinSize.x > oldSize.x ){
SetSize( newMinSize ); SetSize( newMinSize );
// Notify someone that we've changed our size // Notify someone that we've changed our size
Updated(); Updated();
...@@ -186,6 +187,7 @@ void MixerToolBar::UpdatePrefs() ...@@ -186,6 +187,7 @@ void MixerToolBar::UpdatePrefs()
// ELSE preserve original size. // ELSE preserve original size.
else else
SetSize( oldSize ); SetSize( oldSize );
#endif
#endif #endif
// Set label to pull in language change // Set label to pull in language change
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment