mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 17:46:42 +01:00
update file type icons
This commit is contained in:
parent
cf18e32e13
commit
59918491f6
1 changed files with 9 additions and 4 deletions
13
src/view.rs
13
src/view.rs
|
|
@ -36,6 +36,11 @@ impl Content<TuiOut> for Taggart {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Entry {
|
impl Entry {
|
||||||
|
pub const ICON_DIRECTORY: &'static str = "";
|
||||||
|
pub const ICON_IMAGE: &'static str = "";
|
||||||
|
pub const ICON_MUSIC: &'static str = "";
|
||||||
|
pub const ICON_MUSIC_NO_META: &'static str = "";
|
||||||
|
pub const ICON_UNKNOWN: &'static str = "";
|
||||||
pub fn name (&self) -> Option<Arc<str>> {
|
pub fn name (&self) -> Option<Arc<str>> {
|
||||||
let indent = "".pad_to_width((self.depth - 1) * 2);
|
let indent = "".pad_to_width((self.depth - 1) * 2);
|
||||||
let icon = self.icon();
|
let icon = self.icon();
|
||||||
|
|
@ -44,13 +49,13 @@ impl Entry {
|
||||||
}
|
}
|
||||||
fn icon (&self) -> &'static str {
|
fn icon (&self) -> &'static str {
|
||||||
if self.is_dir() {
|
if self.is_dir() {
|
||||||
"" //"+"
|
Self::ICON_DIRECTORY
|
||||||
} else if self.is_img() {
|
} else if self.is_img() {
|
||||||
""
|
Self::ICON_IMAGE
|
||||||
} else if self.is_mus() {
|
} else if self.is_mus() {
|
||||||
""
|
Self::ICON_MUSIC
|
||||||
} else {
|
} else {
|
||||||
"⁇"
|
Self::ICON_UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//fn style (&self) -> Option<Style> {
|
//fn style (&self) -> Option<Style> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue