- Add patch to fix selection of condensed fonts instead of regular

ones:
  * kde5-font-width.patch

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=752
This commit is contained in:
Tomáš Chvátal 2019-01-29 11:09:37 +00:00 committed by Git OBS Bridge
parent c663c04178
commit 550f2b2f77
3 changed files with 34 additions and 0 deletions

29
kde5-font-width.patch Normal file
View File

@ -0,0 +1,29 @@
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;

View File

@ -5,6 +5,9 @@ Fri Jan 25 09:12:12 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
of gtk3 KDE wrapper bsc#1123131
- Add patch to fix detection of KDE session on wayland:
* kde5-detection.patch
- Add patch to fix selection of condensed fonts instead of regular
ones:
* kde5-font-width.patch
-------------------------------------------------------------------
Thu Jan 24 13:19:29 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -102,6 +102,7 @@ Patch3: mediawiki-no-broken-help.diff
Patch4: java112.patch
Patch5: old-boost.patch
Patch6: kde5-detection.patch
Patch7: kde5-font-width.patch
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
BuildRequires: %{name}-share-linker
@ -964,6 +965,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
%patch3
%patch4 -p1
%patch6 -p1
%patch7 -p1
%patch990 -p1
# Disable some of the failing tests (some are random)