findClosestThemedIcon - multiple declarations

Function findClosestThemedIcon

Find icon of the closest size. It uses icon theme cache wherever possible. The first perfect match is used. It searches only for icons in themes.

auto auto findClosestThemedIcon(alias subdirFilter, IconThemes, BaseDirs, Exts) (
  string iconName,
  uint desiredSize,
  IconThemes iconThemes,
  BaseDirs searchIconDirs,
  Exts extensions
);

Parameters

NameDescription
iconName Name of icon to search as defined by Icon Theme Specification (i.e. without path and extension parts).
desiredSize Preferred icon size to get.
iconThemes Range of IconThemeFile objects.
searchIconDirs Base icon directories.
extensions Allowed file extensions.

Returns

IconSearchResult. filePath will be empty if icon is 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 closer size. Therefore the icon found in the more preferred theme always has presedence over icons from other themes.

See Also

findClosestIcon, baseIconDirs, lookupIcon, iconSizeDistance

Function findClosestThemedIcon

ditto, but with predefined extensions.

auto auto findClosestThemedIcon(alias subdirFilter, IconThemes, BaseDirs) (
  string iconName,
  uint size,
  IconThemes iconThemes,
  BaseDirs searchIconDirs
);

See Also

defaultIconExtensions