mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
store notes area size at render
This commit is contained in:
parent
ecbbef22b5
commit
03e2e20258
2 changed files with 8 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ impl Content for PhraseEditor<Tui> {
|
|||
}).fill_y();
|
||||
let notes_bg_null = Color::Rgb(28, 35, 25);
|
||||
let notes = CustomWidget::new(|to|Ok(Some(to)), move|to: &mut TuiOutput|{
|
||||
self.width.store(to.area.w() as usize, Ordering::Relaxed);
|
||||
self.height.store(to.area.h() as usize, Ordering::Relaxed);
|
||||
if to.area().h() >= 2 {
|
||||
let area = to.area();
|
||||
to.buffer_update(area, &move |cell, x, y|{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue