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

width fix #4369

Merged
merged 4 commits into from Apr 1, 2024
Merged

width fix #4369

merged 4 commits into from Apr 1, 2024

Conversation

willmcgugan
Copy link
Collaborator

Fixes #4360

@@ -203,6 +205,13 @@ def __init__(
self.active_effect_duration = 0.3
"""Amount of time in seconds the button 'press' animation lasts."""

def get_content_width(self, container: Size, viewport: Size) -> int:
try:
return max([cell_len(line) for line in self.label.plain.splitlines()]) + 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Might it be worth adding a snapshot test for buttons with multi-line labels?

@willmcgugan willmcgugan merged commit a2ba9eb into main Apr 1, 2024
20 checks passed
@willmcgugan willmcgugan deleted the auto-width branch April 1, 2024 12:14
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.

width: 100% mixed with width: auto amongst children has changed recently
2 participants