From e0083fb8deb6b24aa8f1fd4131f43f97c2550494 Mon Sep 17 00:00:00 2001 From: Florian Dehau Date: Fri, 13 Dec 2019 20:19:59 +0100 Subject: [PATCH] chore: make the onboarding easier for Windows users. --- CHANGELOG.md | 18 +++++++++--------- README.md | 9 +++++++++ src/lib.rs | 13 +++++-------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a5ec5..0497183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## v0.7.0 - 2019-11-29 -### Changed +### Changed * Use `Constraint` instead of integers to specify the widths of the `Table` widget's columns. This will allow more responsive tables. @@ -30,23 +30,23 @@ Table::new(header, row) * Bump crossterm to 0.13. * Use Github Actions for CI (Travis and Azure Pipelines integrations have been deleted). -### Added +### Added * Add support for horizontal and vertical margins in `Layout`. ## v0.6.2 - 2019-07-16 -### Added +### Added * `Text` implements PartialEq -### Fixed +### Fixed * Avoid overflow errors in canvas -## v0.6.1 - 2019-06-16 +## v0.6.1 - 2019-06-16 -### Fixed +### Fixed * Avoid a division by zero when all values in a barchart are equal to 0. * Fix the inverted cursor position in the curses backend. @@ -54,13 +54,13 @@ Table::new(header, row) backend. * Avoid highlighting the separator after the selected item in the Tabs widget. -## v0.6.0 - 2019-05-18 +## v0.6.0 - 2019-05-18 -### Changed +### Changed * Update crossterm backend -## v0.5.1 - 2019-04-14 +## v0.5.1 - 2019-04-14 ### Fixed diff --git a/README.md b/README.md index 403693e..06c53a4 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,18 @@ run: cargo run --example termion_demo --release -- --tick-rate 200 ``` +where `tick-rate` is the UI refresh rate in ms. + The UI code is in [examples/demo/ui.rs](examples/demo/ui.rs) while the application state is in [examples/demo/app.rs](examples/demo/app.rs). +Beware that the `termion_demo` only works on Unix platforms. If you are a Windows user, +you can see the same demo using the `crossterm` backend with the following command: + +``` +cargo run --example crossterm_demo --no-default-features --features="crossterm" --release -- --tick-rate 200 +``` + ### Widgets The library comes with the following list of widgets: diff --git a/src/lib.rs b/src/lib.rs index d37da82..f2640cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,17 +13,14 @@ //! termion = "1.5" //! ``` //! -//! The crate is using the `termion` backend by default but if for some reason you might want to use -//! the `rustbox` backend instead, you need the to replace your dependency specification by: +//! The crate is using the `termion` backend by default but if for example you want your +//! application to work on Windows, you might want to use the `crossterm` backend instead. This can +//! be done by changing your dependencies specification to the following: //! //! ```toml //! [dependencies] -//! rustbox = "0.11" -//! -//! [dependencies.tui] -//! version = "0.7" -//! default-features = false -//! features = ['rustbox'] +//! crossterm = "0.13" +//! tui = { version = "0.7", default-features = false, features = ['crossterm'] } //! ``` //! //! The same logic applies for all other available backends.