Skip to content

Commit 7a38204

Browse files
committed
fix for panel title
1 parent 26479c1 commit 7a38204

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rich/panel.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def __rich_console__(
144144
Padding(self.renderable, _padding) if any(_padding) else self.renderable
145145
)
146146
style = console.get_style(self.style)
147-
border_style = style + console.get_style(self.border_style)
147+
partial_border_style = console.get_style(self.border_style)
148+
border_style = style + partial_border_style
148149
width = (
149150
options.max_width
150151
if self.width is None
@@ -200,7 +201,7 @@ def align_text(
200201

201202
title_text = self._title
202203
if title_text is not None:
203-
title_text.stylize_before(border_style)
204+
title_text.stylize_before(partial_border_style)
204205

205206
child_width = (
206207
width - 2
@@ -249,7 +250,7 @@ def align_text(
249250

250251
subtitle_text = self._subtitle
251252
if subtitle_text is not None:
252-
subtitle_text.stylize_before(border_style)
253+
subtitle_text.stylize_before(partial_border_style)
253254

254255
if subtitle_text is None or width <= 4:
255256
yield Segment(box.get_bottom([width - 2]), border_style)

0 commit comments

Comments
 (0)