Limit nick height

This commit is contained in:
Joscha 2024-03-09 19:02:27 +01:00
parent bd069e8f26
commit db2766bbb4

View file

@ -124,6 +124,7 @@ impl Drawer {
let mut tree = Tree::<Context>::new(WHITE);
let max_username_width_in_chars = 32.0;
let max_username_height_in_lines = 3.0;
let max_content_height_in_lines = 16.0;
let username = Text::new()
@ -131,6 +132,7 @@ impl Drawer {
.widget(&mut self.ctx.font_stuff)
.node()
.with_max_size_width(length(max_username_width_in_chars * 8.0))
.with_max_size_height(length(max_username_height_in_lines * 16.0))
.register(&mut tree)?;
let username = Block::new()