[Libreoffice-commits] core.git: sc/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 12 13:48:06 UTC 2019
sc/source/ui/cctrl/checklistmenu.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 47dbbe214641b9a28871d0c82f71b2afb9c5943c
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jun 12 10:35:43 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jun 12 15:46:44 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.)
Change-Id: Ia3f7b69c5a76e1c15fe04743870e92cffdc351d7
Reviewed-on: https://gerrit.libreoffice.org/73870
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
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)
{
More information about the Libreoffice-commits
mailing list