Determine the checkbox size in wxGetGridCheckBoxRect() itself

It doesn't make much sense to pass the size to the function supposed to
compute it, so call wxRendererNative::GetCheckBoxSize() from the
function itself instead of forcing its callers to do it.

No real changes.
This commit is contained in:
Vadim Zeitlin
2019-11-22 01:07:20 +01:00
parent f4756eaa2f
commit 851d11ba2c
4 changed files with 23 additions and 23 deletions

View File

@@ -1007,12 +1007,16 @@ private:
wxGridDataTypeInfoArray m_typeinfo;
};
// Returns the rect of the check box in a cell with the given alignmens
// and the size.
// The function is used by wxGridCellBoolEditor and wxGridCellBoolRenderer.
wxRect wxGetGridCheckBoxRect(const wxSize& checkBoxSize,
const wxRect& cellRect,
int hAlign, int vAlign);
// Returns the rectangle for showing a check box in a cell with the given
// alignment.
//
// The function is used by wxGridCellBoolEditor and wxGridCellBoolRenderer to
// draw a check mark and position wxCheckBox respectively.
wxRect
wxGetGridCheckBoxRect(wxWindow* win,
const wxRect& cellRect,
int hAlign,
int vAlign);
#endif // wxUSE_GRID
#endif // _WX_GENERIC_GRID_PRIVATE_H_