From 0cd68f866d300d460eadb2d5f00ea9954ae67c04 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 19 Sep 2020 21:57:17 +0400 Subject: [PATCH] Get icon theme from gtk if qt5ct is unconfigured --- Telegram/SourceFiles/platform/linux/linux_libs.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp index 6dfd94694..a57cf7a0f 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp @@ -149,10 +149,16 @@ bool setupGtkBase(QLibrary &lib_gtk) { bool IconThemeShouldBeSet() { // change the icon theme only if it isn't already set by a platformtheme plugin // if QT_QPA_PLATFORMTHEME=(gtk2|gtk3), then force-apply the icon theme - static const auto Result = ((QIcon::themeName() == qstr("hicolor") // QGenericUnixTheme - && QIcon::fallbackThemeName() == qstr("hicolor")) - || (QIcon::themeName() == qstr("Adwaita") // QGnomeTheme - && QIcon::fallbackThemeName() == qstr("gnome"))) + static const auto Result = + // QGenericUnixTheme + (QIcon::themeName() == qstr("hicolor") + && QIcon::fallbackThemeName() == qstr("hicolor")) + // QGnomeTheme + || (QIcon::themeName() == qstr("Adwaita") + && QIcon::fallbackThemeName() == qstr("gnome")) + // qt5ct + || (QIcon::themeName().isEmpty() + && QIcon::fallbackThemeName().isEmpty()) || IsGtkIntegrationForced(); return Result;