diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-01-29 11:35:55 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-01-29 13:26:37 +0100 |
commit | 7cafc7962f371d8f9bcc4d1a26c507a2536df383 (patch) | |
tree | 482f22341fc38a60ac3acf293e282ef463fe66fe /vcl | |
parent | f8f1d2f4419cd96a6aa16101d97b42d2fbb0310b (diff) |
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@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde5/KDE5SalFrame.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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; |