mirror of
https://github.com/rivo/tview.git
synced 2026-04-29 06:45:56 +03:00
[GH-ISSUE #514] Textview: non-dynamic background color #373
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#373
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tjmtmmnk on GitHub (Oct 14, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/514
Hi, Thank you for a wonderful library!
I want the background color to be fixed when using Textview with
SetDynamicColorsset to true.For example, if the terminal's background color is not white or black, running an external command like the
batcommand withcolor=alwaysandTranslateANSIto display it.Please let me know what you think about my request.
@rivo commented on GitHub (Nov 18, 2020):
I'm not completely sure I understand. Does the screenshot show
tviewwithbat's output piped into it usingTranslateANSI? And if so, do you want these grey bars or don't you want them?@tjmtmmnk commented on GitHub (Nov 18, 2020):
I’m sorry I was misunderstanding.
I thought the terminal background color was reflected in the result when I run
batcommand with--color=always, which was wrong.Actually, only the foreground color was specified and the background color was not specified.
It was gray because the background color (
batresult) was not set and the background color of the terminal was reflected.Setting the
TextViewbackground color totcell.ColorDefaultused the terminal background color (https://github.com/rivo/tview/blob/master/box.go#L337), which solved this problem.