1. wxSingleChoiceDialog looks Ok under Windows

2. wxDialog now longer is resizeable by default
3. wxProgressDialog has a more reasonable width


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-25 21:28:25 +00:00
parent 8736a9a0d3
commit 257bf51016
4 changed files with 296 additions and 159 deletions

View File

@@ -68,6 +68,11 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
wxLayoutConstraints *c;
wxClientDC dc(this);
dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
long widthText;
dc.GetTextExtent(message, &widthText, NULL);
m_msg = new wxStaticText(this, -1, message);
c = new wxLayoutConstraints;
c->left.SameAs(this, wxLeft, 10);
@@ -113,9 +118,12 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
// calc the height of the dialog
Fit();
// and set the width from it
// and set the width from it - unfortunately, Fit() makes the dialog way too
// wide under Windows, so try to find a reasonable value for the width, not
// too big and not too small
wxSize size = GetClientSize();
if(size.x < 2*size.y)
size.x = 2*widthText;
if ( size.x < 2*size.y )
SetClientSize(2*size.y, size.y);
Show(TRUE);