-
Notifications
You must be signed in to change notification settings - Fork 864
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
Rendering widgets with differences in different terminals #5601
Comments
We found the following entries in the FAQ which you may find helpful:
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This is an automated reply, generated by FAQtory |
The rendering will depend on the terminal emulator and the capabilities advertised through environment variables like COLORTERM. As mentioned in the issue template, it might be helpful if you run the following command and paste the results:
If you don't have the |
Hi @TomJGooding, I think you are correct. I will the vm when I can access it. Here is my local diagnose: Versions
Python
Operating System
Terminal
Rich Console options
By the way, the problem I had is with the border with the Input and Select widget. I set it to: Is it affected? |
There are differences between terminals, but I will need screenshots to suggest what is expected and what isn't. |
Here's an example: radio buttons are truncated on Ubuntu 24.04 in GNOME terminal: where #!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "textual",
# ]
# ///
from textual.app import App, ComposeResult
from textual.widgets import RadioButton, RadioSet
class TruncatedRadioButtonApp(App):
def compose(self) -> ComposeResult:
with RadioSet():
yield RadioButton(label="<- inner button may be truncated")
def on_mount(self) -> None:
self.title = "Truncated Radio Button Example"
if __name__ == "__main__":
app = TruncatedRadioButtonApp()
app.run(inline=True) It may be reproduced using bash: A workaround is to use a different font in the terminal emulator e.g., DejaVu Sans Mono works fine. $ echo -e '\u2590\u25cf\u258c'
▐●▌ There is also Compatibility -> Ambiguous-width characters: Narrow/Wide setting. "Wide" fixes radio button display but breaks other things. The help says that "Narrow" (default) should be used for ASCII art type of apps (textual case). |
I built a simple tool with textual and I just notice differences how the widget is rendered when running locally with WSL Ubuntu and using Amazon Linux on prod.
Local machine:
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
Prod:
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PRETTY_NAME="Amazon Linux 2023.5.20240903"
By the way, it's just a small differences but i would assume that both local and prod would look the same. But it's not.
Is it a bug or just a problem with the virtual machines?
Hopefully, will get a response. Thanks.
The text was updated successfully, but these errors were encountered: