Layout changes

- Progress bar now less likely to obscure a small window that invokes it.
- Check boxes grouped together in TrackPrefs
This commit is contained in:
James Crook 2018-03-03 12:53:41 +00:00
parent 6b3041118f
commit fb8b797d63
3 changed files with 20 additions and 8 deletions

View File

@ -117,7 +117,6 @@ void BatchProcessDialog::PopulateOrExchange(ShuttleGui &S)
S.Id(ApplyToProjectID).AddButton(_("&Project"));
S.Id(ApplyToFilesID).AddButton(_("&Files..."));
S.AddSpace( 40 );
//S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
S.AddStandardButtons( eCancelButton | eHelpButton);
}
S.EndHorizontalLay();
@ -187,7 +186,10 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
pD->Layout();
pD->Fit();
pD->CenterOnScreen();
pD->Move(-1, 0);
// Avoid overlap with progress.
int x,y;
pD->GetPosition( &x, &y );
pD->Move(wxMax(0,x-300), 0);
pD->Show();
// The Hide() on the next line seems to tickle a bug in wx3,
@ -358,8 +360,13 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
pD->Fit();
pD->SetSizeHints(pD->GetSize());
pD->CenterOnScreen();
pD->Move(-1, 0);
// Avoid overlap with progress.
int x,y;
pD->GetPosition( &x, &y );
pD->Move(wxMax(0,x-300), 0);
pD->Show();
// Give dialog a chance to actually show.
wxYield();
Hide();
mBatchCommands.ReadChain(name);

View File

@ -132,6 +132,9 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
S.TieCheckBox(_("Auto-&fit track height"),
wxT("/GUI/TracksFitVerticallyZoomed"),
false);
S.TieCheckBox(_("Sho&w audio track name as overlay"),
wxT("/GUI/ShowTrackNameInWaveform"),
false);
S.AddSpace(10);
@ -157,10 +160,6 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
30);
}
S.EndMultiColumn();
S.TieCheckBox(_("Sho&w audio track name as overlay"),
wxT("/GUI/ShowTrackNameInWaveform"),
false);
}
S.EndStatic();

View File

@ -1286,7 +1286,13 @@ bool ProgressDialog::Create(const wxString & title,
}
Layout();
Centre(wxCENTER_FRAME | wxBOTH);
// Center progress bar on Parent if it is nice and wide, otherwise Center on screen.
int parentWidth = -1, parentHeight=-1;
if( GetParent() ) GetParent()->GetSize( &parentWidth, &parentHeight );
if (parentWidth > 400)
CenterOnParent();
else
CenterOnScreen();
Reinit();