Commit Graph

544 Commits (master)
 

Author SHA1 Message Date
Oleks (オレクス) a346704cdc
feat(block): add option to center and right align the title (#462)
* Added ability to set title alignment, added tests, modified blocks example to show the feature

* Added test for inner with title in block

* Updated block example to show center alignment

* Formatting fixed

* Updated tests to use lamdas and be more concise. Updated title alignmnet code to be more straightforward and have correct behavior when placing title in the center without left border
3 years ago
Andrew Chin 24396d97ed doc: Add doctests that shows how Text can be created from Cow<str> 3 years ago
Andrew Chin 703e41cd49 feat(Text): Add a From<Cow<str>> impl for Text 3 years ago
Florian Dehau 975c4165d0 chore: fix clippy warnings 3 years ago
Arijit Basu dbf38d847a Add xplr to the "apps using tui" list
`xplr` is a hackable TUI file explorer.
3 years ago
Florian Dehau 91a2519cc3 chore: update links to examples in README
Links now include the fully qualified domain as well as the version.
This will make them work in docs.rs and make sure readers are looking at code which is consistent with the latest version available.
3 years ago
Alexandru Scvortov a1c3ba2088
fix: actually clear buffer in TestBackend::clear (#461) 3 years ago
Alexandru Scvortov d47565be5c
fix: actually clear buffer in TestBackend::clear (#461) 3 years ago
Florian Dehau 1028d39db0 chore: improve contributing guidelines
* Improve issue templates and make them mandatory.
* Improve CONTRIBUTING.md.
* Add template for pull requests.
3 years ago
Deepu K Sasidharan b250825c38
Add kdash to apps using this section (#469)
chore: add `kdash` to apps using `tui`
3 years ago
Florian Dehau 90a6a8f2d6 Release v0.15.0 3 years ago
Florian Dehau 414386e797
chore: update `rand` to 0.8 (#472) 3 years ago
Joey Ezechiëls 3a843d5074
fix(test): remove compile warning in TestBackend::assert_buffer (#466) 3 years ago
Luc Perkins 4e76bfa2ca
chore: add Vector to list of apps using tui (#452)
Signed-off-by: Luc Perkins <luc@timber.io>
3 years ago
Simas Toleikis 8832281dcf Update crossterm to 0.19. 3 years ago
Florian Dehau 853f3d9200 feat(terminal): add a read-only view of the terminal state after the draw call 3 years ago
Florian Dehau 67e996c5f4 feat(examples): add third tab to demo to show colors 3 years ago
Florian Dehau f09863faa0 Release v0.14.0 3 years ago
Florian Dehau eb1e3be722 fix(widgets/block): make Block::inner return more accurate results on small areas 3 years ago
Sagie Gur-Ari 4ec902b96f
chore: make run-examples available on all platforms (#429)
* Make examples available for all platforms
* limit windows to crossterm_demo only and make q exit demos work
3 years ago
Vadim Chekan 74243394d9
fix(widgets/table): draw table header and border even if rows are empty (#426) 3 years ago
Florian Dehau e7f263efa7 chore(ci): fix cargo-make cache on windows runner 3 years ago
Florian Dehau 0991145c58
chore(ci): simplify ci workflow (#428)
* chore(ci): simplify ci workflow

* use more up to date action
* restrict actions allowed to run
* cache cargo-make
3 years ago
Florian Dehau 01d2a8588a chore(ci): reduce the number of triggered jobs 3 years ago
Florian Dehau 45431a2649 chore: add first contributing guidelines 3 years ago
Florian Dehau 0b78fb9201 chore: use `cargo-make` in the CI as well 3 years ago
Florian Dehau 9cdff275cb chore: replace `make` with `cargo-make`
`cargo-make` make it easier to provide developers of all platforms an unified build workflow.
3 years ago
Arne Beer 77c6e106e4
doc(examples): Add comments to "list" example and fix list direction (#425)
* Add docs to list example and fix list direction

* List example: review adjustments and typo fixes
3 years ago
Florian Dehau efdd6bfb19 feat(tests): add tests covering new table features 3 years ago
Florian Dehau 117098d2d2 refactor(examples): add missing margin at the bottom of the header of table in the demo 3 years ago
Florian Dehau f933d892aa chore: update CHANGELOG 3 years ago
Florian Dehau 5ea54792c0 refactor(widgets/table): more flexible table
- control over the style of each cell and its content using the styling capabilities of Text.
- rows with multiple lines.
- fix panics on small areas.
- less generic type parameters.
3 years ago
Tom Forbes 23a9280db7
chore: add gping to the lists of apps using tui (#422)
* Add gping to the lists of apps using tui
3 years ago
Florian Dehau 79e27b1778 refactor(widgets/gauge): stop using unicode blocks by default 3 years ago
DashEightMate 0a05579a1c
feat(widgets/gauge): allow gauge to use unicode block for more descriptive progress (#377)
* gauge now uses unicode blocks for more descriptive progress

* removed unnecessary if

* changed function name to better reflect unicode

* standardized block symbols, added no unicode option, added tests

* formatting

* improved readability

* gauge tests now check color

* formatted
3 years ago
Tom Forbes 0030eb4a13
fix(tests): remove clippy warnings about single char push (#424) 3 years ago
pm100 5bf40343eb
fix(widgets/paragraph): handle trailing nbsp in wrapped text (#405) 4 years ago
Florian Dehau 1e35f983c4 doc(style): improve documentation of Style 4 years ago
Florian Dehau a15ac8870b feat(style): add a method to create a style that reset all properties until that point 4 years ago
Florian Dehau 8a27036a54 fix(widgets/block): allow Block to render on small areas 4 years ago
Florian Dehau 8543523f18 Release v0.13.0 4 years ago
acheronfail 5a9b59866b feat(widgets/listitem): derive PartialEq 4 years ago
Dheepak Krishnamurthy dc76956215
chore: add taskwarrior-tui to the list of apps using tui-rs (#403) 4 years ago
Kemyt 98fb5e4bbd
fix(widgets/table): take borders into account when percentage and ration constraints are used (#385)
* Fix percentage and ratio constraints for table to take borders into account

Percentage and ratio constraints don't take borders into account, which causes
the table to not be correctly aligned. This is easily seen when using 50/50
percentage split with bordered table. However fixing this causes the last column
of table to not get printed, so there is probably another problem with columns
width determination.

* Fix rounding of cassowary solved widths to eliminate imprecisions

* Fix formatting to fit convention

Co-authored-by: Kemyt <kemyt4@gmail.com>
4 years ago
Sebastian Thiel 25ff2e5e61 upgrade crossterm to v0.18
It reduces the amount of dependencies, among other improvements.
4 years ago
Florian Dehau 5050f1ce1c feat(widgets/gauge): add `LineGauge` variant of `Gauge` 4 years ago
Florian Dehau 51b691e7ac Release v0.12.0 4 years ago
Florian Dehau c4cd0a5f31 fix(widgets/chart): use the correct style to draw legend and axis titles
Before this change, the style of the points drawn in the graph area could reused to draw the
title of the axis and the legend. Now the style of these components put on top of the graph area
is solely based on the widget style.
4 years ago
Florian Dehau 41142732ec feat(buffer): add a method to build a `Style` out of an existing `Cell` 4 years ago
Kemyt 62495c3bd1
fix(widgets/barchart): fix chart filled more than actual (#383)
* Fix barchart incorrectly showing chart filled more than actual

Determination of how filled the bar should be was incorrectly taking the
entire chart height into account, when in fact it should take height-1, because
of extra line with label. Because of that the chart appeared fuller than it
should and was full before reaching maximum value.

* Add a test case for checking if barchart fills correctly up to max value

Co-authored-by: Kemyt <kemyt4@gmail.com>
4 years ago