Backport PR #4125 to fix icon theme problems on KDE

This commit is contained in:
Adam Williamson 2022-05-19 12:35:31 -07:00
parent 2d2d1e42ec
commit 63befd5507
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,46 @@
From 427f98963643e7f823f650dab015c80d854aa2d1 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 19 May 2022 09:50:17 -0700
Subject: [PATCH] Specify that we want the Adwaita icon theme
Back in 38556e7e in 2016 when anaconda switched from 'gnome'
icon theme, intending to use 'Adwaita' instead, we dropped the
line that specifically declares what theme anaconda wants to
use. Presumably we expected GTK would always pick Adwaita for
us. However, with GTK 3.24.34, this seems to not reliably happen
on KDE. On KDE images, the breeze icon theme is installed, and
it also provides many of the icons anaconda uses. When running
anaconda on a KDE live image with GTK 3.24.34, we're often seeing
the icons from the breeze theme used instead of the icons from
the Adwaita theme. This happened in 4 out of 4 tests on openQA
prod, 3 out of 4 tests on openQA stg, and 5 out of 5 tests I
ran in a VM myself. I then applied this change directly to the
file in the VM and re-tested another 5 times; all 5 times the
right icons were shown.
I'm not sure why this is suddenly a problem with GTK 3.24.34
when it never was before even though both icon themes have been
in KDE for years, but this seems correct anyway. We definitely
want anaconda to use the Adwaita icons, not ones from any other
theme.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
pyanaconda/ui/gui/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index d458b66f14..428f30e744 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -754,6 +754,7 @@ class GraphicalUserInterface(UserInterface):
# Set some program-wide settings.
settings = Gtk.Settings.get_default()
settings.set_property("gtk-font-name", "Cantarell")
+ settings.set_property("gtk-icon-theme-name", "Adwaita")
# Get the path to the application data
data_path = os.environ.get("ANACONDA_DATA", "/usr/share/anaconda")
--
2.36.1

View File

@ -1,7 +1,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 37.7
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -15,6 +15,10 @@ URL: http://fedoraproject.org/wiki/Anaconda
# make dist
Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.bz2
# https://github.com/rhinstaller/anaconda/pull/4125
# Specify the GTK icon theme to use to make sure we get the right ones
Patch0: 0001-Specify-that-we-want-the-Adwaita-icon-theme.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -456,6 +460,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Thu May 19 2022 Adam Williamson <awilliam@redhat.com> - 37.7-2
- Backport PR #4125 to fix icon theme problems on KDE
* Mon May 09 2022 Packit <hello@packit.dev> - 37.7-1
- Remove the is_repo_enabled method (vponcova)
- Fix too long lines in the Network spoke (vponcova)