X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8a301af2eec8d65fb96959effb797cbfd6ed56b..d949570b6673dadd764686213afb89bddb6f19da:/src/generic/progdlgg.cpp?ds=sidebyside diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index b6e89e568b..e1b79f34a0 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -176,7 +176,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, m_display_estimated = m_last_timeupdate = m_break = 0; m_ctdelay = 0; - // if we are going to have at least one label, remmeber it in this var + // if we are going to have at least one label, remember it in this var wxStaticText *label = NULL; // also count how many labels we really have @@ -261,9 +261,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, sizeDlg.y += 2*LAYOUT_MARGIN; // try to make the dialog not square but rectangular of reasonable width - sizeDlg.x = (wxCoord)wxMax(widthText*2, 4*sizeDlg.y/3); - sizeDlg.x *= 3; - sizeDlg.x /= 2; + sizeDlg.x = (wxCoord)wxMax(3*widthText/2, 4*sizeDlg.y/3); SetClientSize(sizeDlg); } @@ -338,12 +336,8 @@ wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip) wxASSERT_MSG( value <= m_maximum, wxT("invalid progress value") ); - // fill up the gauge if value == maximum because this means that the dialog - // is going to close and the gauge shouldn't be partly empty in this case - if ( m_gauge && value <= m_maximum ) - { - m_gauge->SetValue(value == m_maximum ? value : value + 1); - } + if ( m_gauge ) + m_gauge->SetValue(value); UpdateMessage(newmsg);