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(scrollbar): fix scrollbar background opacity #5462

Conversation

TomJGooding
Copy link
Contributor

@TomJGooding TomJGooding commented Jan 8, 2025

Fixes #5458.

This assumes that when the scrollbar background has opacity, it should blend with the 'base' background and not the background of its widget.

Please review the following checklist.

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

@TomJGooding TomJGooding changed the title fix(scrollbar): fix scroll background opacity fix(scrollbar): fix scrollbar background opacity Jan 8, 2025
@TomJGooding TomJGooding marked this pull request as ready for review January 8, 2025 18:58
@willmcgugan
Copy link
Collaborator

Yeah, this looks like the right fix. Could you humor me and make a small optimization. If the scrollbar background has zero alpha, then don't call the slightly expensive _opacity_background_colors method...

@TomJGooding
Copy link
Contributor Author

@willmcgugan Glad I was on the right track but good point about the optimisation. Updated in a35d48a.

willmcgugan
willmcgugan previously approved these changes Jan 8, 2025
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

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

lgtm

@willmcgugan willmcgugan dismissed their stale review January 8, 2025 20:08

missed something

@willmcgugan
Copy link
Collaborator

Gracias

@willmcgugan willmcgugan merged commit f2b4764 into Textualize:main Jan 9, 2025
23 checks passed
@TomJGooding TomJGooding deleted the fix-scrollbar-fix-scrollbar-background-opacity branch January 9, 2025 09:51
@davep
Copy link
Contributor

davep commented Jan 9, 2025

Thanks @TomJGooding

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.

Scrollbars appear to ignore the background colour percentage
3 participants