Add optional wxWindow parameter to wxButtonBase::GetDefaultSize()

When per-monitor DPI is used, the default button size depends on the DPI of the
display. Use the window to determine this DPI.
This commit is contained in:
Maarten Bent
2019-09-04 20:53:07 +02:00
parent fa2242a0a6
commit 462f2a4686
8 changed files with 16 additions and 14 deletions

View File

@@ -179,11 +179,14 @@ public:
/**
Returns the default size for the buttons. It is advised to make all the dialog
buttons of the same size and this function allows retrieving the (platform and
current font dependent size) which should be the best suited for this.
Returns the default size for the buttons. It is advised to make all the
dialog buttons of the same size and this function allows retrieving the
(platform, and current font dependent) size which should be the best
suited for this.
The optional wxWindow parameter allows to get a per-monitor DPI
specific size.
*/
static wxSize GetDefaultSize();
static wxSize GetDefaultSize(wxWindow* win = NULL);
/**
Returns the string label for the button.