Florian Dehau
eb1e3be722
fix(widgets/block): make Block::inner return more accurate results on small areas
4 years ago
Kenta Iwasaki
1d12ddbdfc
layout: add vertical split constraint test on height
4 years ago
Kenta Iwasaki
f474c76e19
layout: force constraint that width and height are non-negative
4 years ago
Paul Horn
0bb9b388f7
Borrow layout for splitting instead of moving it
...
This allows for layouts to be saved and reused and does not require an additional clone
4 years ago
Florian Dehau
140db9b2e2
refactor(canvas): update shape drawing strategy
...
* Update the `Shape` trait. Instead of returning an iterator of point, all
shapes are now aware of the surface they will be drawn to through a `Painter`.
In order to draw themselves, they paint points of the "braille grid".
* Rewrite how lines are drawn using a common line drawing algorithm (Bresenham).
5 years ago
Florian Dehau
28017f97ea
feat(widgets/chart): add more control on the visibility of the legend
5 years ago
Florian Dehau
ea43413507
fix: remove clippy warnings
5 years ago
Jeffas
db9b1dd689
Make margins be vertical or horizontal
...
This adds support for margins to be either vertical or horizontal, or
both.
5 years ago
Florian Dehau
f8b3526426
Add code example for `Constraint::Ratio`
6 years ago
David Flemström
d360cd3434
Support exact ratios for layout constraints
6 years ago
Sven-Hendrik Haase
144bfb71cf
Upgrade to 2018 edition
6 years ago
Karoline Pauls
8522e028f1
Run `cargo fmt` with the new Rust stable toolchain (1.31.0)
6 years ago
Karoline Pauls
5cee2afc6d
Limit Rect size to prevent u16 overflow
6 years ago
Florian Dehau
d6016788ef
refactor: clippy + rustfmt
6 years ago
Florian Dehau
ad602a54bf
refactor(widgets): replace text rendering in Paragraph
...
* remove custom markup language
* add Text container for both raw and styled strings
6 years ago
Florian Dehau
7181970a32
feat: split layout from rendering
...
* remove layout logic from Terminal
* replace Group with Layout
* add Frame intermediate object
6 years ago
Florian Dehau
df7493fd33
style: Run rustfmt
6 years ago
Florian Dehau
62df7badf3
feat(layout): Add Corner enum
6 years ago
Florian Dehau
36146d970a
[style] rustfmt
6 years ago
Florian Dehau
36a5eb2110
Format code
6 years ago
Florian Dehau
f96db9c74f
[layout] Replace FnMut with FnOnce in Group::render
...
As the function does not need to mutate state and be run multiple times.
6 years ago
Florian Dehau
2cb823a15b
[lib] Fix conversion from cassowary-rs results to internal layouts
...
The library used to compute the layout may returned negative results
given strange contraints. To avoid overflows on unsigned integers operations,
those results will be converted to 0 instead of being converted as is.
7 years ago
Emmanuel Sales
cb8af88adf
Add Copy trait for layout enums
7 years ago
Florian Dehau
1f285fbac0
[src] Run cargo fmt
7 years ago
talha
3045ac4124
Minor codestyle fixes
7 years ago
Florian Dehau
71545a0aa8
Run cargo fmt
7 years ago
Florian Dehau
b2bb24b9d2
Fix rustfmt and clippy errors
7 years ago
Florian Dehau
feefa5d54f
Convert backends to conditionnal features for compilation
8 years ago
Florian Dehau
b19c014889
Fix layout cache on nightly
8 years ago
Florian Dehau
224eb2d8e0
Add support for text styling
8 years ago
Florian Dehau
9bc61551e2
Refactor Terminal to be able to support multiple backends
...
* Add Rustbox as an other possible backend
8 years ago
Florian Dehau
93cc237007
Documentation
8 years ago
Florian Dehau
107d7297af
Fix some layout problems
8 years ago
Florian Dehau
d8d18d3d9d
Fix layout computation
8 years ago
Florian Dehau
c91436baee
Change rendering method and adapt widget trait accordingly
8 years ago
Florian Dehau
ea485b5439
Simpler layout and cleanup api
8 years ago
Florian Dehau
15c3471f0b
Fix clippy warnings
8 years ago
Florian Dehau
d7131ead11
Cache layout and performance fixes
8 years ago
Florian Dehau
fde0ba95dd
Remove cache system and add unicode segmentation
8 years ago
Florian Dehau
bd404f0238
Cleanup code and add chart widget
8 years ago
Florian Dehau
9816ccd4e3
Change layout properties and improve gauge and sparkline
8 years ago
Florian Dehau
275b210fd4
Change layout algorithm
8 years ago
Florian Dehau
d11dedd864
Add sparkline widget and fix warnings
8 years ago
Florian Dehau
5b5d37ee69
Add gauge, fix rendering and cleanup code
8 years ago
Florian Dehau
13f6a5a98b
Add list widget and improve rendering
8 years ago
Florian Dehau
459201bc65
First commit
8 years ago