mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(notifications): show fallback icon instead of checkerboard for missing theme icons
When Qt cannot resolve a notification icon name (e.g. "audio-headset" from Blueman) because the icon theme is not properly configured, the IconImageProvider returns a purple/black checkerboard missingPixmap. Check icon existence via ThemeIcons.iconExists() before returning the image:// URI, so NImageRounded displays its fallback icon instead.
This commit is contained in:
@@ -770,6 +770,11 @@ Singleton {
|
||||
return "";
|
||||
if (icon.startsWith("/") || icon.startsWith("file://"))
|
||||
return icon;
|
||||
// Verify the icon exists in the theme before returning its image:// URI.
|
||||
// Without this check, missing icons render as the purple/black checkerboard
|
||||
// from IconImageProvider::missingPixmap instead of the notification fallback icon.
|
||||
if (!ThemeIcons.iconExists(icon))
|
||||
return "";
|
||||
return ThemeIcons.iconFromName(icon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user