-
Notifications
You must be signed in to change notification settings - Fork 484
List can't have two Text::Styled in one row #118
Comments
This is something I'm experimenting with in #102 but this has a larger implication on the crate itself. The problem is to provide a common interface for people to define their stylized text. For example, there also no way to set the title of a block with the first letter as red and the rest blue. The current principle of the crate is to allow users to customize style of whole widgets "blocks", e.g change the color of this item, change the color of this border, etc. In order to be more flexible, those methods would disappear in favor of a stylized text interface that would be "consumed" by the widgets. There is also some layout implication as highlighted by @karolinepauls in #89. This has the potential to make this crate way more flexible but it is also a big change that I'm afraid I don't have a lot of time to work on currently. TLDR: yes this is a known problem and yes using raw escapes characters is unlikely to get you the result you want :/ |
It seems
tui::widgets::List
expects a list/iterator ofText
, but Text can only beText::Raw
orText::Styled
. It seems I can work around this by using terminal escape characters directly, but it might be a good idea to allow eg 2 Text::Styled.The text was updated successfully, but these errors were encountered: