sc/source/ui/cctrl/checklistmenu.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
New commits: commit f38d7a7c1abdfb59fbbdf4d9bbc8e06fbed77887 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Dec 8 10:34:57 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Dec 10 10:55:57 2021 +0100 restore autofilter to a row taller, now it has less menu items Change-Id: Id6f8b5648eb10d8f44ed3c76836d3b96fd86103e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126533 Tested-by: Caolán McNamara <caol...@redhat.com> 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 7dce50e60e24..cc16644dd72c 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -456,7 +456,9 @@ ScCheckListMember::ScCheckListMember() // the value of border-width of FilterDropDown constexpr int nBorderWidth = 4; // number of rows visible in checklist -constexpr int nCheckListVisibleRows = 8; +constexpr int nCheckListVisibleRows = 9; +// number of rows visible in colorlist +constexpr int nColorListVisibleRows = 9; ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData& rViewData, bool bHasDates, int nWidth, vcl::ILibreOfficeKitNotifier* pNotifier) @@ -1571,11 +1573,19 @@ void ScListSubMenuControl::addMenuColorItem(const OUString& rText, bool bActive, rColorMenu.set_toggle(*mxScratchIter, bActive ? TRISTATE_TRUE : TRISTATE_FALSE); rColorMenu.set_image(*mxScratchIter, rImage); - if (mnTextColorMenuPrefHeight == -1 && &rColorMenu == mxTextColorMenu.get() && mxTextColorMenu->n_children() == 8) + if (mnTextColorMenuPrefHeight == -1 && + &rColorMenu == mxTextColorMenu.get() && + mxTextColorMenu->n_children() == nColorListVisibleRows) + { mnTextColorMenuPrefHeight = mxTextColorMenu->get_preferred_size().Height(); + } - if (mnBackColorMenuPrefHeight == -1 && &rColorMenu == mxBackColorMenu.get() && mxBackColorMenu->n_children() == 8) + if (mnBackColorMenuPrefHeight == -1 && + &rColorMenu == mxBackColorMenu.get() && + mxBackColorMenu->n_children() == nColorListVisibleRows) + { mnBackColorMenuPrefHeight = mxBackColorMenu->get_preferred_size().Height(); + } } void ScListSubMenuControl::addSeparator()