From 1b67bfbf75a23198a606e12955297f7440ba76b0 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 18 Sep 2023 00:56:51 +0200 Subject: [PATCH] chore: replaced tui-rs with ratatui --- Cargo.toml | 2 +- src/app.rs | 2 +- src/display/mod.rs | 2 +- src/display/oscilloscope.rs | 2 +- src/display/spectroscope.rs | 2 +- src/display/vectorscope.rs | 2 +- src/main.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c57abe..13e82ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" [dependencies] -tui = "0.19" +ratatui = { version = "0.23.0", features = ["all-widgets"] } crossterm = "0.25" libpulse-binding = "2.0" libpulse-simple-binding = "2.25" diff --git a/src/app.rs b/src/app.rs index 90bae99..31afd01 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,6 @@ use std::{io, time::{Duration, Instant}, ops::Range}; -use tui::{ +use ratatui::{ style::Color, widgets::{Table, Row, Cell}, symbols::Marker, backend::Backend, widgets::Chart, diff --git a/src/display/mod.rs b/src/display/mod.rs index efdb016..f1f471f 100644 --- a/src/display/mod.rs +++ b/src/display/mod.rs @@ -3,7 +3,7 @@ pub mod vectorscope; pub mod spectroscope; use crossterm::event::Event; -use tui::{widgets::{Dataset, Axis, GraphType}, style::{Style, Color}, symbols::Marker}; +use ratatui::{widgets::{Dataset, Axis, GraphType}, style::{Style, Color}, symbols::Marker}; pub enum Dimension { X, Y diff --git a/src/display/oscilloscope.rs b/src/display/oscilloscope.rs index 96cf93c..702536b 100644 --- a/src/display/oscilloscope.rs +++ b/src/display/oscilloscope.rs @@ -1,5 +1,5 @@ use crossterm::event::{Event, KeyModifiers, KeyCode}; -use tui::{widgets::{Axis, GraphType}, style::Style, text::Span}; +use ratatui::{widgets::{Axis, GraphType}, style::Style, text::Span}; use crate::app::update_value_f; diff --git a/src/display/spectroscope.rs b/src/display/spectroscope.rs index de1cc1c..be543e1 100644 --- a/src/display/spectroscope.rs +++ b/src/display/spectroscope.rs @@ -1,4 +1,4 @@ -use tui::{widgets::{Axis, GraphType}, style::Style, text::Span}; +use ratatui::{widgets::{Axis, GraphType}, style::Style, text::Span}; use super::{DisplayMode, GraphConfig, DataSet, Dimension}; diff --git a/src/display/vectorscope.rs b/src/display/vectorscope.rs index 20a85b5..a97c7e5 100644 --- a/src/display/vectorscope.rs +++ b/src/display/vectorscope.rs @@ -1,4 +1,4 @@ -use tui::{widgets::{Axis, GraphType}, style::Style, text::Span}; +use ratatui::{widgets::{Axis, GraphType}, style::Style, text::Span}; use super::{DisplayMode, GraphConfig, DataSet, Dimension}; diff --git a/src/main.rs b/src/main.rs index 499489b..1f52754 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ mod display; use app::App; use source::PulseAudioSimple; -use tui::{ +use ratatui::{ backend::CrosstermBackend, Terminal, };