rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.15k stars 575 forks source link

Support Multi-Colored table cells #25

Closed maja42 closed 6 years ago

maja42 commented 6 years ago

Currently, it is only possible to define a single color in a TableCell. It would be great if multiple colors could be supported, perhaps using ansi escape characters? (see my previous question/feature request: #24)

Here is my use case: I display a table with various git projects and the current repository status. If any repository is in an unwanted state, the information should be printed red. For example, if there are still uncomitted files or untracked branches, the user should see it at a glance.

Here is an example output how it should look like:

image

This was implemented using gocui. With the current way tables (and table cells in particular) in tview work, this can not be accomplished.

maja42 commented 6 years ago

This is also linked to issue #20

rivo commented 6 years ago

I'm looking into this. Will get back to you.

rivo commented 6 years ago

This is implemented now. It doesn't just affect tables but all other strings as well. I.e. you can partially color titles, lists, modals etc.