some nice changes
This commit is contained in:
+2
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user