Feat: add tachyonFX animations
This commit is contained in:
@@ -22,7 +22,7 @@ impl<'a> ConfirmModal<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) {
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) -> Rect {
|
||||
let t = theme::get();
|
||||
let inner = ModalFrame::new(self.title)
|
||||
.width(30)
|
||||
@@ -58,5 +58,7 @@ impl<'a> ConfirmModal<'a> {
|
||||
Paragraph::new(buttons).alignment(Alignment::Center),
|
||||
rows[1],
|
||||
);
|
||||
|
||||
inner
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ impl<'a> FileBrowserModal<'a> {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) {
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) -> Rect {
|
||||
let colors = theme::get();
|
||||
let border_color = self.border_color.unwrap_or(colors.ui.text_primary);
|
||||
|
||||
@@ -112,5 +112,7 @@ impl<'a> FileBrowserModal<'a> {
|
||||
.collect();
|
||||
|
||||
frame.render_widget(Paragraph::new(lines), rows[1]);
|
||||
|
||||
inner
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ impl<'a> TextInputModal<'a> {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) {
|
||||
pub fn render_centered(self, frame: &mut Frame, term: Rect) -> Rect {
|
||||
let colors = theme::get();
|
||||
let border_color = self.border_color.unwrap_or(colors.ui.text_primary);
|
||||
let height = if self.hint.is_some() { 6 } else { 5 };
|
||||
@@ -81,5 +81,7 @@ impl<'a> TextInputModal<'a> {
|
||||
inner,
|
||||
);
|
||||
}
|
||||
|
||||
inner
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user