question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Table title's padding has a background color by default in some tmux configs.

See original GitHub issue

A friend of mine showed me that tables generated by rich has a background for the padding of the title if he uses tmux. On the left you can see how it looks in tmux and on the right how it looks without tmux.

img img

Code:

summary = Table(title='[not italic bold magenta]Encoding summary')
summary.add_column('[bold cyan]Version\nLatest', style='green')
summary.add_column(f'[bold color(231)]{prog_version}\n{latest_version}', style='color(231)')

summary.add_row('[bold yellow]Output')
summary.add_row('Format', 'TrueHD' if aformat == 'thd' else aformat.upper())
summary.add_row('Channels', channel_number_to_name(outchannels))
summary.add_row('Bitrate', 'N/A' if aformat == 'thd' else f'{str(bitrate)} kbps')
summary.add_row('Dialnorm', 'auto (0)' if args.dialnorm == 0 else f'{str(args.dialnorm)} dB', end_section=True)

summary.add_row('[bold yellow]Input')
summary.add_row('Channels', channel_number_to_name(channels))
summary.add_row('Bit depth', str(bit_depth), end_section=True)
summary.add_row('[bold yellow]Other')
summary.add_row('Files', str(len(filelist)))
summary.add_row('Max threads', str(threads))
summary.add_row('Delay', delay_print)
print(summary)

platform: Linux (WSL)
version: latest

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
pcrolandcommented, Jul 22, 2022

Oh, so the line is italic, and the non italic is only applied to the string if i understand correctly. For some reason I thought the non italic tag is applied after the padding. Thanks for the feedback

0reactions
github-actions[bot]commented, Jul 22, 2022

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kitty 0.14.6 Rendering Glitch with NeoVim and Tmux #2047
Instead you should change the #: default background color in your kitty config and not use a #: background color in the editor...
Read more >
Tmux Select Pane not properly setting default bg/fg color
It sounds like the default changed from window-style to the actual terminal default colour which may or may not have been intentional.
Read more >
tmux(1) - Linux manual page - man7.org
tmux shows any error messages from commands in configuration files in the first session created, and continues to process the rest of the...
Read more >
tmux bottom status bar color change - Unix Stack Exchange
Set status line message background colour, where colour is one of: black, ... In ~/.tmux.conf , use this value to set the desired...
Read more >
CSS for colouring one row of antd table in react - Stack Overflow
One way is to use rowClassName prop of Table: .table-row-light { background-color: #ffffff; } .table-row-dark { background-color: #fbfbfb; }
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found