Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hicolor needs to be set as fallback #19476

Open
konsolebox opened this issue Aug 16, 2023 · 0 comments
Open

Hicolor needs to be set as fallback #19476

konsolebox opened this issue Aug 16, 2023 · 0 comments
Labels
GUI GUI-related issues/changes OS: Linux Issues specific to Linux distributions

Comments

@konsolebox
Copy link

konsolebox commented Aug 16, 2023

qBittorrent & operating system versions

qBittorrent: 4.5.4
Operating system: Gentoo
Qt: 5.15.10

What is the problem?

qBittorrent should set 'hicolor' as fallback if it's going to install its icons in it otherwise it will have an implied dependency on an icon theme that inherits hicolor being set. It should explicitly make sure its icons are being used.

These are the icon files in qbittorrent-4.5.4_lt20_x86_64.AppImage:

./usr/share/icons/hicolor/192x192/status/qbittorrent-tray.png
./usr/share/icons/hicolor/192x192/apps/qbittorrent.png
./usr/share/icons/hicolor/24x24/status/qbittorrent-tray.png
./usr/share/icons/hicolor/24x24/apps/qbittorrent.png
./usr/share/icons/hicolor/32x32/status/qbittorrent-tray.png
./usr/share/icons/hicolor/32x32/apps/qbittorrent.png
./usr/share/icons/hicolor/64x64/status/qbittorrent-tray.png
./usr/share/icons/hicolor/64x64/apps/qbittorrent.png
./usr/share/icons/hicolor/48x48/status/qbittorrent-tray.png
./usr/share/icons/hicolor/48x48/apps/qbittorrent.png
./usr/share/icons/hicolor/96x96/status/qbittorrent-tray.png
./usr/share/icons/hicolor/96x96/apps/qbittorrent.png
./usr/share/icons/hicolor/16x16/status/qbittorrent-tray.png
./usr/share/icons/hicolor/16x16/apps/qbittorrent.png
./usr/share/icons/hicolor/72x72/status/qbittorrent-tray.png
./usr/share/icons/hicolor/72x72/apps/qbittorrent.png
./usr/share/icons/hicolor/128x128/status/qbittorrent-tray.png
./usr/share/icons/hicolor/128x128/apps/qbittorrent.png
./usr/share/icons/hicolor/36x36/status/qbittorrent-tray.png
./usr/share/icons/hicolor/36x36/apps/qbittorrent.png
./usr/share/icons/hicolor/22x22/status/qbittorrent-tray.png
./usr/share/icons/hicolor/22x22/apps/qbittorrent.png

This is the patch I used for 4.5.4 but it won't work with main/master.

diff --git a/src/gui/uithememanager.cpp b/src/gui/uithememanager.cpp
index 25412eb..77cd935 100644
--- a/src/gui/uithememanager.cpp
+++ b/src/gui/uithememanager.cpp
@@ -245,6 +245,7 @@ QColor UIThemeManager::getColor(const QString &id, const QColor &defaultColor) c
 QIcon UIThemeManager::getSystrayIcon() const
 {
     const TrayIcon::Style style = Preferences::instance()->trayIconStyle();
+    QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << QString::fromUtf8("/usr/share/icons/hicolor"));
     switch (style)
     {
 #if defined(Q_OS_UNIX)

Steps to reproduce

Keep system's icon theme unset or theoretically set it to an icon theme that doesn't inherit hicolor.

Additional context

https://bugs.gentoo.org/911542

Log(s) & preferences file(s)

No response

@thalieht thalieht added the OS: Linux Issues specific to Linux distributions label Aug 16, 2023
@luzpaz luzpaz added the GUI GUI-related issues/changes label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI GUI-related issues/changes OS: Linux Issues specific to Linux distributions
Projects
None yet
Development

No branches or pull requests

3 participants