1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 17:41:13 +02:00

Preferences now centered on app rather than centered on toolbar.

This commit is contained in:
james.k.crook@gmail.com
2014-10-25 16:38:06 +00:00
parent c26917a0ee
commit 99bebceb8c

View File

@@ -1551,7 +1551,13 @@ void Meter::OnPreferences(wxCommandEvent & WXUNUSED(event))
dlg.Layout();
dlg.Fit();
dlg.CenterOnParent();
//Old code to center on meter.
//dlg.CenterOnParent();
//New code to center on app.
wxRect r = GetActiveProject()->GetRect();
wxSize size_difference = r.GetSize()- dlg.GetSize();
wxPoint pt = r.GetTopLeft() + size_difference / 2;
dlg.Move( pt );
if (dlg.ShowModal() == wxID_OK)
{