findLargestIcon - multiple declarations
Function findLargestIcon
Find icon of the largest size. It uses icon theme cache wherever possible.
This is similar to findLargestThemedIcon
, but returns file path only and allows to search for non-themed icons.
string findLargestIcon(alias subdirFilter, IconThemes, BaseDirs, Exts)
(
string iconName,
IconThemes iconThemes,
BaseDirs searchIconDirs,
Exts extensions,
Flag!"allowNonThemed" allowNonThemed = Yes .allowNonThemed
);
Parameters
Name | Description |
---|---|
iconName | Name of icon to search as defined by Icon Theme Specification (i.e. without path and extension parts). |
iconThemes | Range of IconThemeFile objects. |
searchIconDirs | Base icon directories. |
extensions | Allowed file extensions. |
allowNonThemed | Allow searching for non-themed fallback if could not find icon in themes. |
Returns
Icon file path or empty string if not found.
Note
If icon of some size was found in the icon theme, this algorithm does not check following themes, even if they contain icons with larger size. Therefore the icon found in the most preferred theme always has presedence over icons from other themes.
See Also
findLargestThemedIcon
, baseIconDirs
, lookupIcon
, findNonThemedIcon
Function findLargestIcon
ditto, but with predefined extensions and non-themed icons allowed.
string findLargestIcon(alias subdirFilter, IconThemes, BaseDirs)
(
string iconName,
IconThemes iconThemes,
BaseDirs searchIconDirs
);