Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: fix alignment with auto and min height/width #5612

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TomJGooding
Copy link
Contributor

Fix issue with alignment in containers with auto and min height/width. Currently the size of the parent passed to _align_size doesn't account for any min height/width when the container has auto dimensions.

Fixes #5608

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

Fix issue with alignment in containers with auto _and_ min height/width.
Currently the size of the parent passed to `_align_size` doesn't account
for any min height/width when the container has auto dimensions.

Fixes Textualize#5608
@TomJGooding
Copy link
Contributor Author

I confess I don't fully understand all the inner workings of sizing and alignment in Textual, so there might be a better way of fixing this. All the tests seem to pass1 after this change so hopefully I'm on the right track, but I'd appreciate any feedback.

Footnotes

  1. Apart from an unrelated snapshot test - see Flaky test_markdown_theme_switching snapshot test #5611

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

Successfully merging this pull request may close these issues.

Align doesn't work with height and min-height combination in widget
1 participant