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: #ARGB to #RGBA conversion #33707

Merged
merged 3 commits into from Apr 13, 2022
Merged

fix: #ARGB to #RGBA conversion #33707

merged 3 commits into from Apr 13, 2022

Conversation

codebytere
Copy link
Member

Description of Change

Fixes an issue where #ARGB ->#RGBA and #AARRGGBB ->#RRGGBBAA were converted improperly when setting background color.

Checklist

Release Notes

Notes: Fixed an issue where #ARGB ->#RGBA and #AARRGGBB ->#RRGGBBAA were converted improperly when setting background color.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/19-x-y labels Apr 11, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Apr 11, 2022
@codebytere codebytere changed the title fix: argb to rgba conversion fix: #ARGB to #RGBA conversion Apr 11, 2022
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

whoops!

Copy link
Member

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

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

Is there a test case where the previous version would parse out a faulty color string? I was wondering if this could also be covered with a test maybe here -

it('returns correct color with multiple passed formats', () => {
?

shell/common/color_util.cc Outdated Show resolved Hide resolved
shell/common/color_util.cc Outdated Show resolved Hide resolved
shell/common/color_util.cc Outdated Show resolved Hide resolved
@codebytere
Copy link
Member Author

@RaisinTen no - the issue is we don't get the alpha value back out so we can't properly compare it. That's something we could eventually consider changing, but probably out of scope of this PR. I've applied the other fix though!

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Apr 12, 2022
@codebytere codebytere merged commit 341b7bd into main Apr 13, 2022
@codebytere codebytere deleted the fix-color-swap branch April 13, 2022 08:46
@release-clerk
Copy link

release-clerk bot commented Apr 13, 2022

Release Notes Persisted

Fixed an issue where #ARGB ->#RGBA and #AARRGGBB ->#RRGGBBAA were converted improperly when setting background color.

@trop trop bot mentioned this pull request Apr 13, 2022
@trop
Copy link
Contributor

trop bot commented Apr 13, 2022

I have automatically backported this PR to "19-x-y", please check out #33755

bavulapati pushed a commit to bavulapati/electron that referenced this pull request Apr 29, 2022
* fix: argb to rgba conversion

* chore: remove logging import

* refactor: color_str -> converted_color_str
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* fix: argb to rgba conversion

* chore: remove logging import

* refactor: color_str -> converted_color_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants