Hi, the attached screenshot shows four windows:
top: yad-icon-browser resolving application icons on GTK2 for default theme "Clarity"
middle top: theme "hicolor" icons for icon names "opera-developer" and "opera-classic"
middle bottom: theme "Clarity" icons for the remaining icon names opera*.
bottom: a yad dialog.
You will notice that yad-icon-browser is showing a blue opera-developer icon and a blue opera-classic icon, while they should be white and red respectively. It seems that either yad-icon-browser or GTK itself isn't using the hicolor fallback at all, and instead it "makes up" a fallback based on icon name "opera" of theme "Clarity", effectively showing wrong icons.
I vaguely remember from my reading the icon specs on freedesktop.org - but I could be wrong - that an application is supposed to fall back on hicolor icons if an icon name match isn't found earlier, either from a direct path of from default theme icons.
Indeed is some cases yad-icon-browser does fall back on hicolor, for instance for icon name "osmo". The difference I notice between opera and osmo is that osmo isn't defined in Clarity apps (and in Clarity in general), while opera is.
This issue is amplified in yad dialog itself (bottom window). Dialogs with button icons defined as below all show the Clarity blue "opera" icon, which in all cases is wrong. The third case is surprising, because "opera-dummy" isn't an existing icon name, but it's still matched with the Clarity "opera" icon.
yad --button='!opera-developer!Opera Developer:4' \ --button='!opera-classic!Opera Classic:16' \ --button='!opera-dummy!Non-existent icon:6'
Forgot to mention platform and versions: tested the same behavior on
0.36.3 (GTK+ 2.24.31)
0.39.0 (GTK+ 2.24.31)
Linux x86_64