diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-06-12 10:35:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-12 15:46:44 +0200 |
commit | 47dbbe214641b9a28871d0c82f71b2afb9c5943c (patch) | |
tree | 154438e6dd58ce412b2dad2c5bb8d7f0e83c17b8 | |
parent | lok: Fix status of InsertPage, DeletePage and DuplicatePage. (diff) | |
download | core-47dbbe214641b9a28871d0c82f71b2afb9c5943c.tar.gz core-47dbbe214641b9a28871d0c82f71b2afb9c5943c.zip |
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.)
Change-Id: Ia3f7b69c5a76e1c15fe04743870e92cffdc351d7
Reviewed-on: https://gerrit.libreoffice.org/73870
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 5 |
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) { |