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

themes: Make background colors partly transparent by default #24151

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

maxbrunsfeld
Copy link
Collaborator

Certain themes define the created and deleted status colors, but not created_background and deleted_background. Previously, Zed would use created and deleted colors, and apply a hard-coded opacity change, but not use created_background and deleted_background, but that behavior was inadvertently changed in #22994.

This PR restores the old behavior as a fallback. If a theme defines a status color, but not the corresponding background color, we'll use a 75% transparent version of the foreground color as a fallback.

Release Notes:

  • Fixed an issue in certain themes where diffs would render with the wrong red and green colors for deletions and insertions.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 3, 2025
@maxbrunsfeld maxbrunsfeld enabled auto-merge (squash) February 3, 2025 22:35
@maxbrunsfeld maxbrunsfeld merged commit 13b7be1 into main Feb 3, 2025
12 checks passed
@maxbrunsfeld maxbrunsfeld deleted the default-status-bg-colors branch February 3, 2025 22:38
maxbrunsfeld added a commit that referenced this pull request Feb 3, 2025
Certain themes define the `created` and `deleted` status colors, but not
`created_background` and `deleted_background`. Previously, Zed would use
`created` and `deleted` colors, and apply a hard-coded opacity change,
but *not* use `created_background` and `deleted_background`, but that
behavior was inadvertently changed in
#22994.

This PR restores the old behavior as a fallback. If a theme defines a
status color, but not the corresponding background color, we'll use a
75% transparent version of the foreground color as a fallback.

Release Notes:

- Fixed an issue in certain themes where diffs would render with the
wrong red and green colors for deletions and insertions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant