Implement wxProgressDialog::DoGetSize() for the native dialog too
DoGetPosition() was done in 1ef1f8fda6
,
implement DoGetSize() too now in order to give a chance Centre() (which
needs both position and size to work).
See #17768.
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
||||
virtual void SetIcons(const wxIconBundle& icons) wxOVERRIDE;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
|
||||
virtual void DoGetPosition(int *x, int *y) const wxOVERRIDE;
|
||||
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
|
||||
virtual void Fit() wxOVERRIDE;
|
||||
|
||||
virtual bool Show( bool show = true ) wxOVERRIDE;
|
||||
|
@@ -838,6 +838,24 @@ void wxProgressDialog::DoGetPosition(int *x, int *y) const
|
||||
wxGenericProgressDialog::DoGetPosition(x, y);
|
||||
}
|
||||
|
||||
void wxProgressDialog::DoGetSize(int *width, int *height) const
|
||||
{
|
||||
#ifdef wxHAS_MSW_TASKDIALOG
|
||||
if ( HasNativeTaskDialog() )
|
||||
{
|
||||
const wxRect r = GetTaskDialogRect();
|
||||
if ( width )
|
||||
*width = r.width;
|
||||
if ( height )
|
||||
*height = r.height;
|
||||
|
||||
return;
|
||||
}
|
||||
#endif // wxHAS_MSW_TASKDIALOG
|
||||
|
||||
wxGenericProgressDialog::DoGetSize(width, height);
|
||||
}
|
||||
|
||||
void wxProgressDialog::Fit()
|
||||
{
|
||||
#ifdef wxHAS_MSW_TASKDIALOG
|
||||
|
Reference in New Issue
Block a user