Prevent constant size changes in native MSW wxProgressDialog
MSW implementation of wxProgressDialog adjusted the dialog size to the size of the message shown in it on each update, resulting in visually unpleasant constant jumping around (this is the same problem that we used to have in wxGenericProgressDialog long time ago, see #10624). Minimize this by using TDM_UPDATE_ELEMENT_TEXT instead of TDM_SET_ELEMENT_TEXT for changing the element text. This still increases the dialog size if the new element text is longer than the old value, but at least doesn't shrink it back if it is shorter, which is already quite an improvement. Notice that this change requires using TDF_EXPAND_FOOTER_AREA style, as otherwise the expanded information can't be updated without a re-layout. But this doesn't seem to be a big loss and it's not really clear why did we explicitly clear this flag before anyhow. Update the dialogs sample to make it easy to test for this behaviour and the documentation to mention MSW version peculiarities.
This commit is contained in:
@@ -194,7 +194,9 @@ public:
|
||||
|
||||
Notice that you may want to call Fit() to change the dialog size to
|
||||
conform to the length of the new message if desired. The dialog does
|
||||
not do this automatically.
|
||||
not do this automatically, except for the native MSW implementation
|
||||
which does increase the dialog size if necessary (but still doesn't
|
||||
shrink it back even if the text becomes shorter).
|
||||
|
||||
@param value
|
||||
The new value of the progress meter. It should be less than or equal to
|
||||
|
Reference in New Issue
Block a user