-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange widget border in 256-color terminal #5101
Comments
Checkbox
border in 256-color terminal
Reverting commit 17097e6 seems to fix this issue, although I don't understand why as the only change was reversing the foreground and background colors. This also doesn't explain why this strange border only appears on the left on specific widgets. |
I suspect a bug in urxvt. There was a change in how some borders were rendered recently, but I'm pretty sure urxvt is doing something wrong with the control sequences given. Will keep the issue open. At some point I'll dig out a linux VM and give it a try. |
Interesting, apparently trying to reverse the same background/foreground color does produce unexpected results. I wonder if this is specific to urxvt then! from rich.console import Console
from rich.style import Style
from rich.text import Text
red_on_red_style = Style(color="red", bgcolor="red")
reversed_style = red_on_red_style + Style(reverse=True)
console = Console()
console.print(Text("Red on red", style=red_on_red_style))
console.print(Text("Reversed", style=reversed_style)) |
Yeah. It looks like it ignores colours when the reverse style is set! |
After some digging into the urxvt CVS, it looks like this was an intentional design decision. Shame as otherwise Textual works well in urxvt, but maybe time to switch to a more modern emulator! Closing.
|
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
I noticed that the
Checkbox
widget now has a strange border in urxvt. I assume this is specific to 256-color terminals, as I couldn't replicate the issue in other modern emulators.Here's screenshots of the checkbox.py example before and after Textual 0.80.0:
The text was updated successfully, but these errors were encountered: