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:
@@ -160,10 +160,8 @@ WXDWORD wxButton::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxSize wxButtonBase::GetDefaultSize()
|
||||
wxSize wxButtonBase::GetDefaultSize(wxWindow* win)
|
||||
{
|
||||
wxWindow* win = wxTheApp ? wxTheApp->GetTopWindow() : NULL;
|
||||
|
||||
static wxPrivate::DpiDependentValue<wxSize> s_sizeBtn;
|
||||
|
||||
if ( s_sizeBtn.HasChanged(win) )
|
||||
|
Reference in New Issue
Block a user