ui stuff
This commit is contained in:
parent
e98fae711e
commit
88132de86e
2
external/cursive-flexi-logger-view
vendored
2
external/cursive-flexi-logger-view
vendored
@ -1 +1 @@
|
|||||||
Subproject commit fd560c499be0f34305e0d48aca7f1bc3d015a17f
|
Subproject commit effa60cea24e99f294865ed325ffc57612d72785
|
@ -220,12 +220,7 @@ impl UI {
|
|||||||
cursive_flexi_logger_view::clear_log();
|
cursive_flexi_logger_view::clear_log();
|
||||||
UI::update_cb(siv);
|
UI::update_cb(siv);
|
||||||
}
|
}
|
||||||
fn node_events(s: &mut Cursive) -> ViewRef<FlexiLoggerView> {
|
fn node_events_panel(s: &mut Cursive) -> ViewRef<Panel<ScrollView<FlexiLoggerView>>> {
|
||||||
s.find_name("node-events").unwrap()
|
|
||||||
}
|
|
||||||
fn node_events_panel(
|
|
||||||
s: &mut Cursive,
|
|
||||||
) -> ViewRef<Panel<ResizedView<NamedView<ScrollView<FlexiLoggerView>>>>> {
|
|
||||||
s.find_name("node-events-panel").unwrap()
|
s.find_name("node-events-panel").unwrap()
|
||||||
}
|
}
|
||||||
fn command_line(s: &mut Cursive) -> ViewRef<EditView> {
|
fn command_line(s: &mut Cursive) -> ViewRef<EditView> {
|
||||||
@ -743,18 +738,11 @@ impl UI {
|
|||||||
|
|
||||||
// Create layouts
|
// Create layouts
|
||||||
|
|
||||||
let node_events_view = Panel::new(
|
let node_events_view = Panel::new(FlexiLoggerView::new_scrollable())
|
||||||
FlexiLoggerView::new()
|
|
||||||
.with_name("node-events")
|
|
||||||
.scrollable()
|
|
||||||
.scroll_x(true)
|
|
||||||
.scroll_y(true)
|
|
||||||
.scroll_strategy(ScrollStrategy::StickToBottom)
|
|
||||||
.full_screen(),
|
|
||||||
)
|
|
||||||
.title_position(HAlign::Left)
|
.title_position(HAlign::Left)
|
||||||
.title("Node Events")
|
.title("Node Events")
|
||||||
.with_name("node-events-panel");
|
.with_name("node-events-panel")
|
||||||
|
.full_screen();
|
||||||
|
|
||||||
let peers_table_view = PeersTableView::new()
|
let peers_table_view = PeersTableView::new()
|
||||||
.column(PeerTableColumn::NodeId, "Node Id", |c| c.width(43))
|
.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_colors(&mut siv, &mut inner, settings);
|
||||||
UI::setup_quit_handler(&mut siv);
|
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(inner);
|
||||||
drop(siv);
|
drop(siv);
|
||||||
|
Loading…
Reference in New Issue
Block a user