Skip to main content

load_system_icon_by_name

Function load_system_icon_by_name 

Source
pub fn load_system_icon_by_name(name: &str, set: IconSet) -> Option<IconData>
Expand description

Load a system icon by its platform-specific name string.

Dispatches to the appropriate platform loader based on the icon set:

Returns None if the icon is not found on the current platform or the icon set is not available.

§Examples

use native_theme::{load_system_icon_by_name, IconSet};

let icon = load_system_icon_by_name("content_copy", IconSet::Material);
assert!(icon.is_some());