pub struct FileIconVisual {
pub icon: IconId,
pub color: Option<Color>,
}Expand description
Icon identifier and optional recommended foreground tint.
None leaves tint choice to the caller. The helpers in this module always
return Some: amber for directories, green for directory symlinks, the
Devicons color for recognized files, or light gray for fallbacks.
§Examples
use ailloli_ui_core::{Color, IconId};
use ailloli_ui_widgets::files::FileIconVisual;
let visual = FileIconVisual::new(IconId::Plus, Some(Color::hex_rgb(0xffffff)));
assert_eq!(visual.icon, IconId::Plus);
assert!(visual.color.is_some());Fields§
§icon: IconIdGlyph source to paint.
color: Option<Color>Optional caller-overridable tint.
Implementations§
Trait Implementations§
Source§impl Clone for FileIconVisual
impl Clone for FileIconVisual
Source§fn clone(&self) -> FileIconVisual
fn clone(&self) -> FileIconVisual
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileIconVisual
impl Debug for FileIconVisual
Source§impl PartialEq for FileIconVisual
impl PartialEq for FileIconVisual
impl StructuralPartialEq for FileIconVisual
Auto Trait Implementations§
impl Freeze for FileIconVisual
impl RefUnwindSafe for FileIconVisual
impl Send for FileIconVisual
impl Sync for FileIconVisual
impl Unpin for FileIconVisual
impl UnwindSafe for FileIconVisual
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.