Merge pull request #3156 from PrismLauncher/backport-3152-to-release-9.x
[Backport release-9.x] Fix system icons on Linux
This commit is contained in:
commit
cdfd0b1002
@ -1,7 +1,6 @@
|
|||||||
[Icon Theme]
|
[Icon Theme]
|
||||||
Name=Legacy
|
Name=Legacy
|
||||||
Comment=Default Icons
|
Comment=Default Icons
|
||||||
Inherits=default
|
|
||||||
Directories=8x8,16x16,22x22,24x24,32x32,32x32/instances,48x48,50x50/instances,64x64,128x128/instances,256x256,scalable,scalable/instances
|
Directories=8x8,16x16,22x22,24x24,32x32,32x32/instances,48x48,50x50/instances,64x64,128x128/instances,256x256,scalable,scalable/instances
|
||||||
|
|
||||||
[8x8]
|
[8x8]
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
ThemeManager::ThemeManager()
|
ThemeManager::ThemeManager()
|
||||||
{
|
{
|
||||||
|
QIcon::setFallbackThemeName(QIcon::themeName());
|
||||||
|
QIcon::setFallbackSearchPaths(QIcon::themeSearchPaths());
|
||||||
themeDebugLog() << "Determining System Widget Theme...";
|
themeDebugLog() << "Determining System Widget Theme...";
|
||||||
const auto& style = QApplication::style();
|
const auto& style = QApplication::style();
|
||||||
m_defaultStyle = style->objectName();
|
m_defaultStyle = style->objectName();
|
||||||
@ -93,9 +95,7 @@ void ThemeManager::initializeIcons()
|
|||||||
// set icon theme search path!
|
// set icon theme search path!
|
||||||
themeDebugLog() << "<> Initializing Icon Themes";
|
themeDebugLog() << "<> Initializing Icon Themes";
|
||||||
|
|
||||||
auto searchPaths = QIcon::themeSearchPaths();
|
QIcon::setThemeSearchPaths({ m_iconThemeFolder.path(), ":/icons" });
|
||||||
searchPaths.append(m_iconThemeFolder.path());
|
|
||||||
QIcon::setThemeSearchPaths(searchPaths);
|
|
||||||
|
|
||||||
for (const QString& id : builtinIcons) {
|
for (const QString& id : builtinIcons) {
|
||||||
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
||||||
|
Loading…
Reference in New Issue
Block a user