1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

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.
This commit is contained in:
James Crook
2018-07-22 15:18:44 +01:00
parent d990890232
commit 9e1291b2b7
4 changed files with 7 additions and 5 deletions

View File

@@ -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();

View File

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

View File

@@ -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);
}

View File

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