From 3d98129b5142d581bcaacf111248d54817da6c7e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Nov 2017 22:22:40 +0100 Subject: [PATCH] Further improve wxProgressDialog resizing behaviour documentation Unfortunately it doesn't seem possible to prevent the native MSW dialog from changing its size in both upper and lower direction vertically, so at least mention this in the documentation and mention a possible workaround of manually adjusting the text to always have the same number of lines. --- interface/wx/progdlg.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/interface/wx/progdlg.h b/interface/wx/progdlg.h index e5b0ac3f36..8393273523 100644 --- a/interface/wx/progdlg.h +++ b/interface/wx/progdlg.h @@ -213,11 +213,14 @@ public: until this happens. Notice that if @a newmsg is longer than the currently shown message, - the dialog size will be automatically increased to account for it. - However if the new message is shorter than the previous one, the dialog - doesn't shrink back to avoid constant resizes if the message is changed - often. To shrink back the dialog to fit its current contents you may - call Fit() explicitly. + the dialog will be automatically made wider to account for it. However + if the new message is shorter than the previous one, the dialog doesn't + shrink back to avoid constant resizes if the message is changed often. + To do this and fit the dialog to its current contents you may call + Fit() explicitly. However the native MSW implementation of this class + does make the dialog shorter if the new text has fewer lines of text + than the old one, so it is recommended to keep the number of lines of + text constant in order to avoid jarring dialog size changes. @param value The new value of the progress meter. It should be less than or equal to