Skip to content

Commit

Permalink
minor: ratatui 0.29, ratatui-image 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreiff committed Nov 26, 2024
1 parent c59466e commit 1b0df71
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
41 changes: 24 additions & 17 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ keywords = ["bevy", "ratatui", "terminal", "tui", "render"]
bevy = "0.14.2"
crossterm = "0.28.0"
crossbeam-channel = "0.5.13"
ratatui = "0.28.1"
ratatui-image = "2.0.1"
bevy_ratatui = "0.6.3"
ratatui = "0.29.0"
ratatui-image = "3.0.0"
bevy_ratatui = "0.6.4"

[profile.dev]
opt-level = 1
Expand Down
6 changes: 3 additions & 3 deletions src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub struct RatatuiRenderWidget<'a> {

impl<'a> RatatuiRenderWidget<'a> {
pub fn new(image: &'a Image) -> Self {
let mut picker = Picker::new((1, 2));
picker.protocol_type = ProtocolType::Halfblocks;
let mut picker = Picker::from_fontsize((1, 2));
picker.set_protocol_type(ProtocolType::Halfblocks);

Self { image, picker }
}
Expand Down Expand Up @@ -45,6 +45,6 @@ impl<'a> Widget for RatatuiRenderWidget<'a> {
.new_protocol(image, render_area, Resize::Fit(None))
.unwrap();

ratatui_image::Image::new(img_as_halfblocks.as_ref()).render(render_area, buf);
ratatui_image::Image::new(&img_as_halfblocks).render(render_area, buf);
}
}

0 comments on commit 1b0df71

Please sign in to comment.