Whole file
Textualize/rich
The author described this change as “fix(panel): fix title missing panel background”. It counts as a record because the check below fails on the code as it stood at 69e1618f1 and passes on 30e5ed61a, with nothing else changed between the two runs.
ProjectTextualize/rich
Fix saved2025-05-01
Sharing licenceMIT · LICENSE
Change size+3 −4
What the code was meant to do, written into the code itself as a save note
fix(panel): fix title missing panel background
The change
| 146 | 146 | Padding(self.renderable, _padding) if any(_padding) else self.renderable | |
| 147 | 147 | ) | |
| 148 | 148 | style = console.get_style(self.style) | |
| 149 | - | partial_border_style = console.get_style(self.border_style) | |
| 150 | - | border_style = style + partial_border_style | |
| 149 | + | border_style = style + console.get_style(self.border_style) | |
| 151 | 150 | width = ( | |
| 152 | 151 | options.max_width | |
| 153 | 152 | if self.width is None | |
| ⋯ | |||
| 206 | 205 | ||
| 207 | 206 | title_text = self._title | |
| 208 | 207 | if title_text is not None: | |
| 209 | - | title_text.stylize_before(partial_border_style) | |
| 208 | + | title_text.stylize_before(border_style) | |
| 210 | 209 | ||
| 211 | 210 | child_width = ( | |
| 212 | 211 | width - 2 | |
| ⋯ | |||
| 255 | 254 | ||
| 256 | 255 | subtitle_text = self._subtitle | |
| 257 | 256 | if subtitle_text is not None: | |
| 258 | - | subtitle_text.stylize_before(partial_border_style) | |
| 257 | + | subtitle_text.stylize_before(border_style) | |
| 259 | 258 | ||
| 260 | 259 | if subtitle_text is None or width <= 4: | |
| 261 | 260 | yield Segment(box.get_bottom([width - 2]), border_style) | |
The check that tells the two apart
fail→pass·tests/test_panel.py::test_title_text_with_panel_background
Check file tests/test_panel.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it69e1618f1f3aae6589cd6210d9d318ab0cdf91da
Broken version dated2025-05-01
Modulerich.panel
Units changedPanel
Fingerprint2f7d616e8fdae568
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in Textualize/rich
- 2026-04-12TableDataElement
- 2026-02-01_cell_len
- 2026-01-24get_character_cell_size
- 2025-11-13Fix raw markup printed on prompt errors sometimes
- 2024-10-03fix(table): highlight columns added by add_row
- 2023-01-06fix issue splitting segments