|
@@ -17,6 +17,7 @@ use futures::{channel::mpsc::UnboundedSender, pin_mut, Future, StreamExt};
|
|
use futures_channel::mpsc::unbounded;
|
|
use futures_channel::mpsc::unbounded;
|
|
use layout::TaffyLayout;
|
|
use layout::TaffyLayout;
|
|
use prevent_default::PreventDefault;
|
|
use prevent_default::PreventDefault;
|
|
|
|
+use ratatui::{backend::CrosstermBackend, Terminal};
|
|
use std::{io, time::Duration};
|
|
use std::{io, time::Duration};
|
|
use std::{
|
|
use std::{
|
|
pin::Pin,
|
|
pin::Pin,
|
|
@@ -26,7 +27,6 @@ use std::{rc::Rc, sync::RwLock};
|
|
use style_attributes::StyleModifier;
|
|
use style_attributes::StyleModifier;
|
|
pub use taffy::{geometry::Point, prelude::*};
|
|
pub use taffy::{geometry::Point, prelude::*};
|
|
use tokio::select;
|
|
use tokio::select;
|
|
-use tui::{backend::CrosstermBackend, Terminal};
|
|
|
|
use widgets::{register_widgets, RinkWidgetResponder, RinkWidgetTraitObject};
|
|
use widgets::{register_widgets, RinkWidgetResponder, RinkWidgetTraitObject};
|
|
|
|
|
|
mod config;
|
|
mod config;
|
|
@@ -180,7 +180,7 @@ pub fn render<R: Driver>(
|
|
|
|
|
|
if !to_rerender.is_empty() || updated {
|
|
if !to_rerender.is_empty() || updated {
|
|
updated = false;
|
|
updated = false;
|
|
- fn resize(dims: tui::layout::Rect, taffy: &mut Taffy, rdom: &RealDom) {
|
|
|
|
|
|
+ fn resize(dims: ratatui::layout::Rect, taffy: &mut Taffy, rdom: &RealDom) {
|
|
let width = screen_to_layout_space(dims.width);
|
|
let width = screen_to_layout_space(dims.width);
|
|
let height = screen_to_layout_space(dims.height);
|
|
let height = screen_to_layout_space(dims.height);
|
|
let root_node = rdom
|
|
let root_node = rdom
|
|
@@ -222,7 +222,7 @@ pub fn render<R: Driver>(
|
|
} else {
|
|
} else {
|
|
let rdom = rdom.read().unwrap();
|
|
let rdom = rdom.read().unwrap();
|
|
resize(
|
|
resize(
|
|
- tui::layout::Rect {
|
|
|
|
|
|
+ ratatui::layout::Rect {
|
|
x: 0,
|
|
x: 0,
|
|
y: 0,
|
|
y: 0,
|
|
width: 1000,
|
|
width: 1000,
|