[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - desktop/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 3 08:36:50 UTC 2019


 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4e6aa95e84314173518137eba988623125712b9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 2 10:02:46 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Sep 3 10:36:10 2019 +0200

    Resolves: tdf#126042 measure text width with the bold font it will render with
    
    Change-Id: I81cc0351e652c632bd85efa6dacb36be66fcfb3c
    Reviewed-on: https://gerrit.libreoffice.org/78390
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 560d83a95d06..3fb65ffb3fa3 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -443,11 +443,11 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools:
         nMaxTitleWidth -= nLinkWidth + (2 * SPACE_BETWEEN);
     }
     long aVersionWidth = rRenderContext.GetTextWidth(rEntry->m_sVersion);
-    long aTitleWidth = rRenderContext.GetTextWidth(rEntry->m_sTitle) + (aTextHeight / 3);
 
     aPos = rRect.TopLeft() + Point(ICON_OFFSET, TOP_OFFSET);
 
     rRenderContext.SetFont(aBoldFont);
+    long aTitleWidth = rRenderContext.GetTextWidth(rEntry->m_sTitle) + (aTextHeight / 3);
     if (aTitleWidth > nMaxTitleWidth - aVersionWidth)
     {
         aTitleWidth = nMaxTitleWidth - aVersionWidth - (aTextHeight / 3);


More information about the Libreoffice-commits mailing list