From e269a9be19a8c454fee444500447db925992f86b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Feb 2002 16:33:05 +0000 Subject: [PATCH] minor fix to the constraints of the cancel button to improve its sizing under wxUniv git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/progdlgg.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 0e4c493c43..2730fb4d4a 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -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(); -- 2.45.2