get_icon_by_size


Description:

public unowned Icon? get_icon_by_size (uint width, uint height)

Gets an icon matching the size constraints.

The icons are not filtered by type, and the first icon which matches the size is returned. If you want more control over which icons you use for displaying, use the as_component_get_icons() function to get a list of all icons.

Note that this function is not HiDPI aware! It will never return an icon with a scaling factor > 1.

Parameters:

this

an Component instance

width

The icon width in pixels.

height

the icon height in pixels.

Returns:

An icon matching the given width/height, or null if not found.