ltk::theme::assets

Function branding_asset

Source
pub fn branding_asset(name: &str, ext: &str) -> Option<PathBuf>
Expand description

Resolve a branding asset (launcher logo, wallpaper, lockscreen, …) against the active theme’s branding/ tree. Tries three candidate paths in order and returns the first one that exists on disk:

  1. branding/{active_mode}/{name}.{ext} — preferred variant.
  2. branding/{opposite_mode}/{name}.{ext} — graceful degradation when the theme only ships one mode of the asset.
  3. branding/{name}.{ext} — mode-agnostic asset, for themes that do not bother with light/dark variants.

Returns None when none of the candidates exist or the active document has no on-disk root.