Skip to content

Commit

Permalink
convert to using ratatui (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragnyll committed May 5, 2023
1 parent 79cd6b0 commit daf25df
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
48 changes: 30 additions & 18 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"
keywords = ["tui-rs", "ranger", "file manager", "termion"]

[dependencies]
ansi-to-tui = { version = "^2", optional = true }
ansi-to-tui = { version = "^3", optional = true }
alphanumeric-sort = "^1"
chrono = "^0"
colors-transform = "^0"
Expand All @@ -33,7 +33,7 @@ structopt = "^0"
termion = "^1"
toml = "^0"
trash = { version = "^2", optional = true }
tui = { version = "^0", default-features = false, features = ["termion"] }
tui = { version = "0.20", default-features = false, features = ["termion"], package = "ratatui" }
unicode-segmentation = "^1"
unicode-width = "^0"
users = "^0"
Expand Down
3 changes: 2 additions & 1 deletion src/ui/views/tui_folder_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ pub fn calculate_layout(area: Rect, constraints: &[Constraint; 3]) -> Vec<Rect>
let mut layout_rect = Layout::default()
.direction(Direction::Horizontal)
.constraints(constraints.as_ref())
.split(area);
.split(area)
.to_vec();

layout_rect[0] = Rect {
width: layout_rect[0].width - 1,
Expand Down
3 changes: 2 additions & 1 deletion src/ui/views/tui_hsplit_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ fn calculate_layout(area: Rect, constraints: &[Constraint; 2]) -> Vec<Rect> {
let mut layout_rect = Layout::default()
.direction(Direction::Horizontal)
.constraints(constraints.as_ref())
.split(area);
.split(area)
.to_vec();

layout_rect[0] = Rect {
width: layout_rect[0].width - 1,
Expand Down

0 comments on commit daf25df

Please sign in to comment.