Make wxRendererMSW::GetHeaderButtonMargin() more accurate
Follow Wine in using 3*SM_CXEDGE as margins on each side. This also has the advantage of working better in high DPI, as we don't hardcode the value in pixels any longer.
This commit is contained in:
committed by
Vadim Zeitlin
parent
e26d90028b
commit
d8c3c53f05
@@ -590,9 +590,10 @@ int wxRendererMSW::GetHeaderButtonHeight(wxWindow * win)
|
||||
return Header_Layout(hwndHeader, &hdl) ? wp.cy : DEFAULT_HEIGHT;
|
||||
}
|
||||
|
||||
int wxRendererMSW::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
|
||||
int wxRendererMSW::GetHeaderButtonMargin(wxWindow *win)
|
||||
{
|
||||
return 10;
|
||||
// The native control seems to use 3*SM_CXEDGE margins on each size.
|
||||
return 6*wxGetSystemMetrics(SM_CXEDGE, win);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
Reference in New Issue
Block a user