Comments (4)
fn title<T: Into>(self, title: T, position: Position) -> Self;
<pre-coffee-josh>
This change would be a "break the world" type change, so it is very likely not the right approach. The underlying idea is sound however. Likely title_at or something similar would work.
from ratatui.
<post-coffee-josh>
So the idea with removing block::Title is that Line already has an indication of Left/Center/Right as part of it. For the block titles it doesn't seem like there's any possible use of this field other than positioning. Which leaves the position really only needing top / bottom. What's your thoughts on this?
from ratatui.
You know, it never occurred to me to use the alignment field for this. The functionality I want is already possible, and would continue to work with the other proposal. I'm going to close this. Thanks!
from ratatui.
The alignment field on title also does the same thing. The overlap in having a Title that contains a Line which both have alignment is where the removal proposal comes from.
from ratatui.
Related Issues (20)
- Onboard to bencher, to start tracking benchmarks over time HOT 9
- Reuse std::fmt::Alignment HOT 3
- Running `cargo test` fails HOT 6
- Inconsistent behavior between `Line::from` and `Line::raw` HOT 3
- Allow bypassing diff and writing all to screen HOT 6
- RSX-based interface to reduce boilerplate code HOT 5
- Make methods / fields on buffer that deal with the underlying content index private.
- Italic Borders? HOT 3
- `clippy::same_name_method` with Stylize HOT 5
- Add a Buffer::fill method
- Move away from using Prelude / glob imports
- Add .next()/.prev() to ListState to make traversing a list of selectable items easier HOT 4
- Consistent examples in ratatui HOT 2
- Add Stylize methods directly to Style HOT 3
- index out of bounds: the len is 17526 but the index is 17526 HOT 9
- Change examples folder structure HOT 4
- Features documentation on docs.rs isn't right. HOT 4
- TableState resets offset to 0 HOT 4
- Bug: ensure that block title rows apply the border style
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratatui.