some nice changes

This commit is contained in:
2024-11-07 23:58:29 +01:00
parent 739a5ea72a
commit 5ff2866f26
7 changed files with 158 additions and 77 deletions
+2 -2
View File
@@ -138,11 +138,11 @@ pub fn closest_component(
.unwrap_or(current_index) // If no component is found, return the current index
}
pub fn create_frame(width: crate::ElementSize, height: crate::ElementSize) -> Vec<String> {
pub fn create_frame(width: crate::Value<usize>, height: crate::Value<usize>) -> Vec<String> {
vec![" ".repeat(width.get_size()); height.get_size()]
}
pub fn get_term_size() -> (usize, usize) {
let (width, height) = crossterm::terminal::size().unwrap();
(width as usize, height as usize)
}
}