Center date editor vertically in the grid

Do it for consistency with the other editors and because it looks better
when the date picker is taller than the line height.
This commit is contained in:
Vadim Zeitlin
2020-06-22 02:18:21 +02:00
parent 097f1a17cb
commit 74377ecf38

View File

@@ -1800,7 +1800,7 @@ void wxGridCellDateEditor::SetSize(const wxRect& r)
rect.SetWidth(wxMin(r.GetWidth(), 2*bestSize.GetWidth()));
}
wxGridCellEditor::SetSize(rect);
wxGridCellEditor::SetSize(rect.CenterIn(r, wxVERTICAL));
}
void wxGridCellDateEditor::BeginEdit(int row, int col, wxGrid* grid)