From 9e1291b2b7b28d05bdbbe90be4a873298764ff0f Mon Sep 17 00:00:00 2001 From: James Crook Date: Sun, 22 Jul 2018 15:18:44 +0100 Subject: [PATCH] Improve initial and minimum widths of resizable toolbars. In particular, device toolbar previously could be made ridiculously small. Also in the default configuration it takes a whole line, so we now use that space in its initial size. Mixer Toolbar initial size was a little small. Now it matches the Transport Toolbar width. Meter Toolbar initial size was too small. Transcription Toolbar was a little too small. Better to start out slightly wider than previously. --- src/toolbars/DeviceToolBar.h | 6 +++--- src/toolbars/MixerToolBar.h | 1 + src/toolbars/ToolBar.cpp | 4 ++-- src/toolbars/TranscriptionToolBar.h | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/toolbars/DeviceToolBar.h b/src/toolbars/DeviceToolBar.h index c05c64e3a..07f88c821 100644 --- a/src/toolbars/DeviceToolBar.h +++ b/src/toolbars/DeviceToolBar.h @@ -44,9 +44,9 @@ class DeviceToolBar final : public ToolBar { void OnChoice(wxCommandEvent & event); /// When the prefs don't exist this value is used. - /// It should be small enough to work on tiny screens - int GetInitialWidth() override{ return 620; } - int GetMinToolbarWidth() override { return 200; } + /// 883 takes a complete row in the default initial size of Audacity. + int GetInitialWidth() override{ return 883; } + int GetMinToolbarWidth() override { return 350; } void ShowInputDialog(); void ShowOutputDialog(); diff --git a/src/toolbars/MixerToolBar.h b/src/toolbars/MixerToolBar.h index aaaeeec73..116e781b0 100644 --- a/src/toolbars/MixerToolBar.h +++ b/src/toolbars/MixerToolBar.h @@ -39,6 +39,7 @@ class MixerToolBar final : public ToolBar { void Repaint(wxDC * WXUNUSED(dc)) override {}; void EnableDisableButtons() override {}; int GetMinToolbarWidth() override { return 250; } + int GetInitialWidth() override { return 327; } void OnFocus(wxFocusEvent &event); void OnCaptureKey(wxCommandEvent &event); diff --git a/src/toolbars/ToolBar.cpp b/src/toolbars/ToolBar.cpp index 748f7cee6..701703001 100644 --- a/src/toolbars/ToolBar.cpp +++ b/src/toolbars/ToolBar.cpp @@ -522,8 +522,8 @@ void ToolBar::ReCreateButtons() // Initial size at least as big as minimum. if( sz3.y < sz2.y ) sz3.y = sz2.y; - if( sz3.x < sz2.x ) - sz3.x = GetInitialWidth(); + //if( sz3.x < sz2.x ) + sz3.x = GetInitialWidth(); //sz.SetWidth(); SetSize(sz3); } diff --git a/src/toolbars/TranscriptionToolBar.h b/src/toolbars/TranscriptionToolBar.h index 27c433cf8..fc9a101fa 100644 --- a/src/toolbars/TranscriptionToolBar.h +++ b/src/toolbars/TranscriptionToolBar.h @@ -82,6 +82,7 @@ class TranscriptionToolBar final : public ToolBar { void Repaint(wxDC * WXUNUSED(dc)) override {}; void EnableDisableButtons() override; void UpdatePrefs() override; + int GetInitialWidth() override { return 191; } int GetMinToolbarWidth() override { return 125; } void OnFocus(wxFocusEvent &event);