X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c79904b9e45415b54b11fd2a62605129538ae6b..2f12683e40eee0104fc92a76524337a350a3a3a0:/src/generic/progdlgg.cpp?ds=sidebyside diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 8f2fc1e404..2730fb4d4a 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -126,7 +126,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, wxLayoutConstraints *c; wxClientDC dc(this); - dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); long widthText; dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL); @@ -221,16 +221,17 @@ wxProgressDialog::wxProgressDialog(wxString const &title, #endif // MSW/!MSW c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN); - wxSize sizeBtn = wxButton::GetDefaultSize(); - c->width.Absolute(sizeBtn.x); - c->height.Absolute(sizeBtn.y); + c->width.AsIs(); + c->height.AsIs(); m_btnAbort->SetConstraints(c); - sizeDlg.y += 2*LAYOUT_Y_MARGIN + sizeBtn.y; + sizeDlg.y += 2*LAYOUT_Y_MARGIN + wxButton::GetDefaultSize().y; } - else + else // no "Cancel" button + { m_btnAbort = (wxButton *)NULL; + } SetAutoLayout(TRUE); Layout();