Remove PopupView Trait
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
use std::io;
|
||||
|
||||
use ratatui::layout::{Constraint, Layout, Rect};
|
||||
|
||||
use super::{
|
||||
center_rect,
|
||||
component::{list::ListComponent, Component},
|
||||
PopupView,
|
||||
View,
|
||||
};
|
||||
|
||||
pub struct SettingView {
|
||||
@@ -22,7 +24,7 @@ impl Default for SettingView {
|
||||
}
|
||||
}
|
||||
|
||||
impl PopupView for SettingView {
|
||||
impl View for SettingView {
|
||||
fn draw(&self, frame: &mut ratatui::Frame) {
|
||||
let area = center_rect(frame.area(), self.area.width, self.area.height);
|
||||
let layout = Layout::default()
|
||||
@@ -31,5 +33,7 @@ impl PopupView for SettingView {
|
||||
frame.render_widget(self.menu.widget(), layout[0]);
|
||||
}
|
||||
|
||||
fn handle_event(&mut self, _event: &crossterm::event::Event) {}
|
||||
fn handle_event(&mut self, _event: &crossterm::event::Event) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user