Kaydet (Commit) 7cafc796 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

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: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst f8f1d2f4
...@@ -85,7 +85,9 @@ static vcl::Font toFont(const QFont& rQFont, const css::lang::Locale& rLocale) ...@@ -85,7 +85,9 @@ static vcl::Font toFont(const QFont& rQFont, const css::lang::Locale& rLocale)
// set width // set width
int nStretch = rQFont.stretch(); 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; aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED;
else if (nStretch <= QFont::ExtraCondensed) else if (nStretch <= QFont::ExtraCondensed)
aInfo.m_eWidth = WIDTH_EXTRA_CONDENSED; aInfo.m_eWidth = WIDTH_EXTRA_CONDENSED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment