sc/source/ui/cctrl/checklistmenu.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 3028480ca720283bdab2878d348c29698d0ace16 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Jun 12 10:35:43 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jun 13 08:44:02 2019 +0200 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 <vmik...@collabora.com> 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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits