From 078ca4b8b97ae2e82874ae17b09cd5eb8b77907c Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sun, 8 Dec 2024 23:44:42 +0200 Subject: [PATCH] draw the screen withing its 64x32 size --- src/display.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/display.rs b/src/display.rs index 4d6cdeb..1c95df7 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1,3 +1,4 @@ +use ratatui::layout::Rect; use ratatui::style::Color; use ratatui::symbols::Marker; use ratatui::widgets::canvas::Canvas; @@ -96,7 +97,10 @@ impl Display for RatatuiDisplay { .y_bounds([0.0, DISPLAY_HEIGHT as f64]); // Render the canvas widget - frame.render_widget(canvas, frame.area()); + frame.render_widget( + canvas, + Rect::new(0, 0, DISPLAY_WIDTH as u16, DISPLAY_HEIGHT as u16), + ); }) .expect("failed to draw"); }