summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-06-12 10:35:43 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-06-13 08:44:02 +0200
commit3028480ca720283bdab2878d348c29698d0ace16 (patch)
tree16259aadcde36c670b73f9c08c415e87886ee39c /sc/source
parent4904391e125eb66304a5c029def8d4c1a150952d (diff)
tdf#125791 sc autofilter popup: make sure menu item text uses the label font
It happened that the first and subsequent paints used a different font size, standardize on the label font. E.g. the linux gen backend used either 11 or 12 pt font height, now it always uses 12pt, matching the gtk3 behavior. (No cutoff of text with Windows gdi 125% text size this way, either.) (cherry picked from commit 47dbbe214641b9a28871d0c82f71b2afb9c5943c) Change-Id: Ia3f7b69c5a76e1c15fe04743870e92cffdc351d7 Reviewed-on: https://gerrit.libreoffice.org/73888 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 8383738967a5..2b74bfd3d605 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -360,9 +360,14 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size
DecorationView aDecoView(&rRenderContext);
long const nXOffset = 5;
long nYOffset = (aSize.Height() - maLabelFont.GetFontHeight())/2;
+
+ // Make sure the label font is used for the menu item text.
+ rRenderContext.Push(PushFlags::FONT);
+ rRenderContext.SetFont(maLabelFont);
rRenderContext. DrawCtrlText(Point(aPos.X()+nXOffset, aPos.Y() + nYOffset), maMenuItems[nPos].maText, 0,
maMenuItems[nPos].maText.getLength(),
maMenuItems[nPos].mbEnabled ? DrawTextFlags::Mnemonic : DrawTextFlags::Disable);
+ rRenderContext.Pop();
if (maMenuItems[nPos].mpSubMenuWin)
{