forked from pool/libreoffice
ones: * kde5-font-width.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=752
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 0bdfb521f8a16be634b073d45d07c34b51f8e5e4 Mon Sep 17 00:00:00 2001
|
|
From: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Date: Tue, 29 Jan 2019 11:35:55 +0100
|
|
Subject: [PATCH] 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
|
|
---
|
|
|
|
diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
|
|
index ec4a7ff..d3a1396 100644
|
|
--- a/vcl/unx/kde5/KDE5SalFrame.cxx
|
|
+++ b/vcl/unx/kde5/KDE5SalFrame.cxx
|
|
@@ -85,7 +85,9 @@
|
|
|
|
// 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;
|