better element structure

This commit is contained in:
2024-11-30 21:00:02 +01:00
parent 71d10bc331
commit 1eef3d4306
6 changed files with 64 additions and 19 deletions
+2 -1
View File
@@ -99,7 +99,8 @@ impl Frame {
}
}
pub fn render(&mut self, focused: bool, element: &Element) {
if let Some(output) = element.render(focused) {
let output = element.render(focused, self.width, self.frame.len());
if output.1.visible {
let x;
let mut y = 0;
match output.1.y {