Slightly improve sizing of wxInfoFrame used by wxBusyInfo.

Specify the margin around the text in dialog units, not pixels.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-10-24 21:54:27 +00:00
parent f9788f7e27
commit 4936366716

View File

@ -52,8 +52,10 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
// make the frame of at least the standard size (400*80) but big enough
// for the text we show
wxSize sizeText = text->GetBestSize();
SetClientSize(wxMax(sizeText.x, 340) + 60, wxMax(sizeText.y, 40) + 40);
wxSize size = text->GetBestSize();
size.IncBy(ConvertDialogToPixels(wxPoint(10, 10)));
size.IncTo(wxSize(400, 80));
SetClientSize(size);
// need to size the panel correctly first so that text->Centre() works
panel->SetSize(GetClientSize());