From 9a45c02002b759e488426359a6a82bcda090b242 Mon Sep 17 00:00:00 2001 From: James Crook <james.k.crook@gmail.com> 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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/toolbars/MixerToolBar.cpp b/src/toolbars/MixerToolBar.cpp index 3e8f7bbf76..26f46c1580 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(); +// 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 -- GitLab