Skip to content

Commit

Permalink
chore: update ratatui to 0.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiapple852 committed Oct 21, 2024
1 parent 86135c3 commit 57252ce
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 431 deletions.
14 changes: 10 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ paste = "1.0.15"
petgraph = "0.6.5"
pretty_assertions = "1.4.1"
rand = "0.8.5"
ratatui = "0.28.1"
ratatui = "0.29.0"
rust-i18n = "3.1.2"
serde = { version = "1.0.201", default-features = false }
serde_json = { version = "1.0.117", default-features = false }
Expand Down
1 change: 0 additions & 1 deletion crates/trippy-tui/src/frontend/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ pub mod splash;
pub mod table;
pub mod tabs;
pub mod util;
pub mod widgets;
pub mod world;
7 changes: 3 additions & 4 deletions crates/trippy-tui/src/frontend/render/history.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::frontend::render::widgets::sparkline::{EmptyBarSymbol, Sparkline};
use crate::frontend::tui_app::TuiApp;
use crate::t;
use ratatui::layout::Rect;
use ratatui::style::Style;
use ratatui::widgets::{Block, BorderType, Borders};
use ratatui::widgets::{Block, BorderType, Borders, Sparkline};
use ratatui::Frame;

/// Render the ping history for the final hop which is typically the target.
Expand Down Expand Up @@ -40,11 +39,11 @@ pub fn render(f: &mut Frame<'_>, app: &TuiApp, rect: Rect) {
.bg(app.tui_config.theme.bg)
.fg(app.tui_config.theme.samples_chart),
)
.empty_bar_style(
.absent_value_style(
Style::default()
.bg(app.tui_config.theme.bg)
.fg(app.tui_config.theme.samples_chart_lost),
)
.empty_bar_symbol(EmptyBarSymbol::Full);
.absent_value_symbol(ratatui::symbols::bar::FULL);
f.render_widget(history, rect);
}
2 changes: 1 addition & 1 deletion crates/trippy-tui/src/frontend/render/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn render_settings_table(
.bg(app.tui_config.theme.bg)
.fg(app.tui_config.theme.text),
)
.highlight_style(Style::default().add_modifier(Modifier::REVERSED));
.row_highlight_style(Style::default().add_modifier(Modifier::REVERSED));
f.render_stateful_widget(table, rect, &mut app.setting_table_state);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/trippy-tui/src/frontend/render/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn render(f: &mut Frame<'_>, app: &mut TuiApp, rect: Rect) {
.bg(app.tui_config.theme.bg)
.fg(app.tui_config.theme.text),
)
.highlight_style(selected_style)
.row_highlight_style(selected_style)
.column_spacing(1);
f.render_stateful_widget(table, rect, &mut app.table_state);
}
Expand Down
13 changes: 0 additions & 13 deletions crates/trippy-tui/src/frontend/render/widgets.rs

This file was deleted.

Loading

0 comments on commit 57252ce

Please sign in to comment.