pub struct Theme {
pub info: ThemeInfo,
pub inherits_from: Vec<Arc<Theme>>,
}Expand description
An icon theme.
Fields§
§info: ThemeInfoProperties of this theme and all of its subdirectories.
inherits_from: Vec<Arc<Theme>>References to the Themes that this theme depends on.
When querying for an icon that doesn’t exist in this theme, the themes in its inherits_from
list will be checked for that icon instead.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn find_icon_unscaled(&self, icon_name: &str, size: u32) -> Option<IconFile>
pub fn find_icon_unscaled(&self, icon_name: &str, size: u32) -> Option<IconFile>
Find an icon in this theme or any of its dependencies, with scale equal to 1.
Also see find_icon
Sourcepub fn find_icon(
&self,
icon_name: &str,
size: u32,
scale: u32,
) -> Option<IconFile>
pub fn find_icon( &self, icon_name: &str, size: u32, scale: u32, ) -> Option<IconFile>
Find an icon in this theme or any of its dependencies.
This function seeks to replicate the behaviour from the official icon lookup mechanism from the Icon Theme specification, which you can find here.
Arguments:
icon_name: the canonical name of the icon without file extension.size: the size, in pixels, desired. The returned icon may not be this exact size in case an exact match couldn’t be found.scale: the scale at which the icon will be displayed.
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more