Skip to content

Commit

Permalink
Added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Futsch1 committed Jan 7, 2022
1 parent 20997a2 commit 5fbd37a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use sixtyfps::Image;
use crate::item_sort_list::{FileItem, ItemList};
use crate::main_window::{ListItem, SortItem};

/// Create a sort item for the GUI from a file item
pub fn sort_item_from_file_item(
file_item: &FileItem,
item_list: &ItemList,
Expand All @@ -20,6 +21,7 @@ pub fn sort_item_from_file_item(
}
}

/// Get the list item title for the GUI from a file item
pub fn list_item_title(file_item: &FileItem, item_list: &ItemList) -> sixtyfps::SharedString {
let mut title = file_item.get_item_string(&item_list.path);
if item_list.get_event(file_item).is_some() {
Expand All @@ -28,6 +30,7 @@ pub fn list_item_title(file_item: &FileItem, item_list: &ItemList) -> sixtyfps::
sixtyfps::SharedString::from(title)
}

/// Create a list item for the GUI from a file item
pub fn list_item_from_file_item(file_item: &FileItem, item_list: &ItemList) -> ListItem {
ListItem {
text: list_item_title(file_item, item_list),
Expand Down

0 comments on commit 5fbd37a

Please sign in to comment.