mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Get icon theme from gtk if qt5ct is unconfigured
This commit is contained in:
parent
242ced4022
commit
0cd68f866d
1 changed files with 10 additions and 4 deletions
|
@ -149,10 +149,16 @@ bool setupGtkBase(QLibrary &lib_gtk) {
|
||||||
bool IconThemeShouldBeSet() {
|
bool IconThemeShouldBeSet() {
|
||||||
// change the icon theme only if it isn't already set by a platformtheme plugin
|
// 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
|
// if QT_QPA_PLATFORMTHEME=(gtk2|gtk3), then force-apply the icon theme
|
||||||
static const auto Result = ((QIcon::themeName() == qstr("hicolor") // QGenericUnixTheme
|
static const auto Result =
|
||||||
&& QIcon::fallbackThemeName() == qstr("hicolor"))
|
// QGenericUnixTheme
|
||||||
|| (QIcon::themeName() == qstr("Adwaita") // QGnomeTheme
|
(QIcon::themeName() == qstr("hicolor")
|
||||||
&& QIcon::fallbackThemeName() == qstr("gnome")))
|
&& QIcon::fallbackThemeName() == qstr("hicolor"))
|
||||||
|
// QGnomeTheme
|
||||||
|
|| (QIcon::themeName() == qstr("Adwaita")
|
||||||
|
&& QIcon::fallbackThemeName() == qstr("gnome"))
|
||||||
|
// qt5ct
|
||||||
|
|| (QIcon::themeName().isEmpty()
|
||||||
|
&& QIcon::fallbackThemeName().isEmpty())
|
||||||
|| IsGtkIntegrationForced();
|
|| IsGtkIntegrationForced();
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue