summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-08 10:34:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-10 10:55:57 +0100
commitf38d7a7c1abdfb59fbbdf4d9bbc8e06fbed77887 (patch)
treeef22d4932e74c36f510295c5503712bab10e6aea /sc
parente2d498b778a3dac70a7faee4d1bbabb50cdcc103 (diff)
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 <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx16
1 files changed, 13 insertions, 3 deletions
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()