diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 14:08:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 17:02:17 +0100 |
commit | 75517c177755268a9f3894c371cf81bf0bd0ebf2 (patch) | |
tree | b5965fba0543d3445e313db11f094a9c6e073a46 /sc/source/ui/cctrl | |
parent | 9944abbba3d70874d4a8051ac99566510f3facaf (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/cctrl')
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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; |