svx/source/fmcomp/gridcell.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit b35f8f82b8e29f5877879f360b22bd291e21a3cc Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jul 29 16:40:36 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jul 29 21:29:51 2020 +0200 center the filter checkbox like the normal one Change-Id: I7954430640fe9788c650f5fe7b103426731204cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99716 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 326188c81463..21323cd9ad48 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2630,8 +2630,17 @@ void DbFilterField::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) switch (m_nControlClass) { case FormComponentType::CHECKBOX: - DbCellControl::PaintCell( rDev, rRect ); + { + // center the checkbox within the space available + CheckBoxControl* pControl = static_cast<CheckBoxControl*>(m_pPainter.get()); + Size aBoxSize = pControl->GetBox().get_preferred_size(); + tools::Rectangle aRect(Point(rRect.Left() + ((rRect.GetWidth() - aBoxSize.Width()) / 2), + rRect.Top() + ((rRect.GetHeight() - aBoxSize.Height()) / 2)), + aBoxSize); + + DbCellControl::PaintCell(rDev, aRect); break; + } case FormComponentType::LISTBOX: rDev.DrawText(rRect, static_cast<ListBoxControl*>(m_pWindow.get())->get_widget().get_active_text(), nStyle); break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits