[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 29 12:27:00 UTC 2019
vcl/unx/kde5/KDE5SalFrame.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 7cafc7962f371d8f9bcc4d1a26c507a2536df383
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jan 29 11:35:55 2019 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jan 29 13:26: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>
diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
index ec4a7ff8f45c..d3a13968237f 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