From 88132de86e1ce422c739b41b348fb33310b9e6df Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 21 Nov 2022 20:55:10 -0500 Subject: [PATCH] ui stuff --- external/cursive-flexi-logger-view | 2 +- veilid-cli/src/ui.rs | 26 +++++++------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/external/cursive-flexi-logger-view b/external/cursive-flexi-logger-view index fd560c49..effa60ce 160000 --- a/external/cursive-flexi-logger-view +++ b/external/cursive-flexi-logger-view @@ -1 +1 @@ -Subproject commit fd560c499be0f34305e0d48aca7f1bc3d015a17f +Subproject commit effa60cea24e99f294865ed325ffc57612d72785 diff --git a/veilid-cli/src/ui.rs b/veilid-cli/src/ui.rs index 2d07a345..bacdc3ad 100644 --- a/veilid-cli/src/ui.rs +++ b/veilid-cli/src/ui.rs @@ -220,12 +220,7 @@ impl UI { cursive_flexi_logger_view::clear_log(); UI::update_cb(siv); } - fn node_events(s: &mut Cursive) -> ViewRef { - s.find_name("node-events").unwrap() - } - fn node_events_panel( - s: &mut Cursive, - ) -> ViewRef>>>> { + fn node_events_panel(s: &mut Cursive) -> ViewRef>> { s.find_name("node-events-panel").unwrap() } fn command_line(s: &mut Cursive) -> ViewRef { @@ -743,18 +738,11 @@ impl UI { // Create layouts - let node_events_view = Panel::new( - FlexiLoggerView::new() - .with_name("node-events") - .scrollable() - .scroll_x(true) - .scroll_y(true) - .scroll_strategy(ScrollStrategy::StickToBottom) - .full_screen(), - ) - .title_position(HAlign::Left) - .title("Node Events") - .with_name("node-events-panel"); + let node_events_view = Panel::new(FlexiLoggerView::new_scrollable()) + .title_position(HAlign::Left) + .title("Node Events") + .with_name("node-events-panel") + .full_screen(); let peers_table_view = PeersTableView::new() .column(PeerTableColumn::NodeId, "Node Id", |c| c.width(43)) @@ -833,7 +821,7 @@ impl UI { UI::setup_colors(&mut siv, &mut inner, settings); UI::setup_quit_handler(&mut siv); - siv.set_global_callback(cursive::event::Event::Ctrl(Key::K), UI::clear_handler); + siv.set_global_callback(cursive::event::Event::CtrlChar('k'), UI::clear_handler); drop(inner); drop(siv);