Skip to content
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

Fix Panel logic for selecting priority of title/subtitle styling #2746

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

noprobelm
Copy link

@noprobelm noprobelm commented Jan 11, 2023

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

This is a proposed fix for the issue described in #2745.

  • The existing behavior of the Panel.__rich_console__ method is to check if title_text and subtitle_text are present, and if so, apply the Panel's border style indicated by border_style.
  • My proposed change is to extend the existing conditional statements to refrain from setting the styles for title_text and subtitle_text if they were already defined in the Panel instance when the console protocol was initiated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant