[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 29 15:47:59 UTC 2019


 vcl/unx/kde5/KDE5SalFrame.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7cef089465c3e0038c3e5a5606ad9b9d7dfb5acd
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jan 29 11:35:55 2019 +0100
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Tue Jan 29 16:47:37 2019 +0100

    KDE5 map QFont::stretch() == 0 to WIDTH_DONTKNOW
    
    From the Qt5 documentation: "QFont::AnyStretch / 0: Accept any
    stretch matched using the other QFont properties (added in Qt
    5.8)". So this maps 0 to LO's WIDTH_DONTKNOW, which fixes the
    too narrow font selection in the KDE5 backend, when applying the
    KDE5 font setting to LO.
    
    Change-Id: I5f1a62d6c314c0766b540869c49c72bc3f6821c3
    Reviewed-on: https://gerrit.libreoffice.org/67059
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 7cafc7962f371d8f9bcc4d1a26c507a2536df383)
    Reviewed-on: https://gerrit.libreoffice.org/67067
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
index 9c82f6ca53b1..c4b72f3afa89 100644
--- a/vcl/unx/kde5/KDE5SalFrame.cxx
+++ b/vcl/unx/kde5/KDE5SalFrame.cxx
@@ -85,7 +85,9 @@ static vcl::Font toFont(const QFont& rQFont, const css::lang::Locale& rLocale)
 
     // set width
     int nStretch = rQFont.stretch();
-    if (nStretch <= QFont::UltraCondensed)
+    if (nStretch == 0) // QFont::AnyStretch since Qt 5.8
+        aInfo.m_eWidth = WIDTH_DONTKNOW;
+    else if (nStretch <= QFont::UltraCondensed)
         aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED;
     else if (nStretch <= QFont::ExtraCondensed)
         aInfo.m_eWidth = WIDTH_EXTRA_CONDENSED;


More information about the Libreoffice-commits mailing list