From 9a45c02002b759e488426359a6a82bcda090b242 Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 20 Sep 2018 15:35:07 +0100 Subject: [PATCH] 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. --- src/toolbars/MixerToolBar.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/toolbars/MixerToolBar.cpp b/src/toolbars/MixerToolBar.cpp index 3e8f7bbf7..26f46c158 100644 --- a/src/toolbars/MixerToolBar.cpp +++ b/src/toolbars/MixerToolBar.cpp @@ -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