Skip to content

Commit

Permalink
Upgrade to ratatui 0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPickering committed Feb 16, 2024
1 parent 91e510f commit e122869
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 12 deletions.
61 changes: 56 additions & 5 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 @@ -26,7 +26,7 @@ indexmap = {version = "^2.0.1", features = ["serde"]}
itertools = "^0.12.0"
nom = "7.1.3"
notify = {version = "^6.1.1", default-features = false, features = ["macos_fsevent"]}
ratatui = "^0.25.0"
ratatui = "^0.26.0"
reqwest = {version = "^0.11.20", default-features = false, features = ["rustls-tls"]}
rmp-serde = "^1.1.2"
rusqlite = {version = "^0.30.0", default-features = false, features = ["bundled", "chrono", "uuid"]}
Expand Down
8 changes: 3 additions & 5 deletions src/tui/view/common/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ impl<T: FixedSelect + Persistable> EventHandler for Tabs<T> {
impl<T: FixedSelect + Persistable> Draw for Tabs<T> {
fn draw(&self, frame: &mut Frame, _: (), area: Rect) {
frame.render_widget(
ratatui::widgets::Tabs::new(
T::iter().map(|e| e.to_string()).collect(),
)
.select(self.tabs.selected_index())
.highlight_style(TuiContext::get().theme.tab_highlight_style),
ratatui::widgets::Tabs::new(T::iter().map(|e| e.to_string()))
.select(self.tabs.selected_index())
.highlight_style(TuiContext::get().theme.tab_highlight_style),
area,
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/tui/view/component/primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl<'a> Draw<PrimaryViewProps<'a>> for PrimaryView {
let [left_area, right_area] = layout(
area,
Direction::Horizontal,
[Constraint::Max(40), Constraint::Percentage(50)],
[Constraint::Max(40), Constraint::Min(40)],
);

// Split left column vertically
Expand Down

0 comments on commit e122869

Please sign in to comment.