mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-22 13:00:22 -04:00
feat: clear the dialog area before rendering
This commit is contained in:
parent
48aad97f5b
commit
56979103d6
@ -3,7 +3,7 @@ use ratatui::{
|
|||||||
layout::{Constraint, Layout, Rect},
|
layout::{Constraint, Layout, Rect},
|
||||||
style::{Color, Style, Stylize},
|
style::{Color, Style, Stylize},
|
||||||
text::Text,
|
text::Text,
|
||||||
widgets::{Block, Paragraph, Widget, Wrap},
|
widgets::{Block, Clear, Paragraph, Widget, Wrap},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct Dialog<'w> {
|
pub struct Dialog<'w> {
|
||||||
@ -42,6 +42,7 @@ impl<'w> Widget for Dialog<'w> {
|
|||||||
])
|
])
|
||||||
.areas(area);
|
.areas(area);
|
||||||
|
|
||||||
|
Clear.render(dialog_area, buf);
|
||||||
let dialog_block = Block::bordered()
|
let dialog_block = Block::bordered()
|
||||||
.title_top(self.title)
|
.title_top(self.title)
|
||||||
.title_bottom("j,k or up,down to scroll")
|
.title_bottom("j,k or up,down to scroll")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user