|
|
@ -1,7 +1,7 @@
|
|
|
|
use crate::compositor::{Component, Compositor, Context, EventResult};
|
|
|
|
use crate::compositor::{Component, Compositor, Context, EventResult};
|
|
|
|
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
|
|
|
|
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
|
|
|
|
use tui::buffer::Buffer as Surface;
|
|
|
|
|
|
|
|
use tui::{
|
|
|
|
use tui::{
|
|
|
|
|
|
|
|
buffer::Buffer as Surface,
|
|
|
|
layout::Rect,
|
|
|
|
layout::Rect,
|
|
|
|
style::{Color, Style},
|
|
|
|
style::{Color, Style},
|
|
|
|
widgets::{Block, Borders},
|
|
|
|
widgets::{Block, Borders},
|
|
|
@ -107,8 +107,10 @@ impl Component for Popup {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn render(&self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
|
|
|
|
fn render(&self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
|
|
|
|
use tui::text::Text;
|
|
|
|
use tui::{
|
|
|
|
use tui::widgets::{Paragraph, Widget, Wrap};
|
|
|
|
text::Text,
|
|
|
|
|
|
|
|
widgets::{Paragraph, Widget, Wrap},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
cx.scroll = Some(self.scroll);
|
|
|
|
cx.scroll = Some(self.scroll);
|
|
|
|
|
|
|
|
|
|
|
|