sc/source/ui/cctrl/checklistmenu.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 75517c177755268a9f3894c371cf81bf0bd0ebf2 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Nov 30 14:08:35 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 30 17:02:17 2021 +0100 make autofilter a row shorter, now it has extra menu items for the filter by color options, which have pushed its height up taller than it used to be. I think it would be better to make more submenus here to shrink its height down further, but that's not attempted here. Change-Id: Idb484bd77d2cca6e175d997955b0967720d94ec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126121 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index e7cdd6c19fe8..b12868ea2f2a 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -430,6 +430,8 @@ ScCheckListMember::ScCheckListMember() // the value of border-width of FilterDropDown constexpr int nBorderWidth = 4; +// number of rows visible in checklist +constexpr int nCheckListVisibleRows = 8; ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScDocument* pDoc, bool bHasDates, int nWidth, vcl::ILibreOfficeKitNotifier* pNotifier) @@ -491,7 +493,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScDocument mpChecks = mxListChecks.get(); } - int nChecksHeight = mxTreeChecks->get_height_rows(9); + int nChecksHeight = mxTreeChecks->get_height_rows(nCheckListVisibleRows); if (nWidth != -1) { mnCheckWidthReq = nWidth - nBorderWidth * 2 - 4; @@ -1416,7 +1418,7 @@ int ScCheckListMenuControl::IncreaseWindowWidthToFitText(int nMaxTextWidth) if (nNewWidth > mnCheckWidthReq) { mnCheckWidthReq = nNewWidth; - int nChecksHeight = mpChecks->get_height_rows(9); + int nChecksHeight = mpChecks->get_height_rows(nCheckListVisibleRows); mpChecks->set_size_request(mnCheckWidthReq, nChecksHeight); } return mnCheckWidthReq + nBorder;