Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
If you apply multiple labels to the same mod, some weird visual artifacts can happen; the affected row can have the text of multiple mods overlapping each other:
Causes
DataGridView
can only handle row colors with an alpha channel of 0 or 255; if you set anything in between, it gets confused and basically seems to not paint the rowUtil.BlendColors
is implemented in terms ofUtil.AlphaBlendWith
, which uses a floating point alpha channel to compute what it would look like if one color was overlaid over the other with the given level of transparency. Unfortunately, even for two colors with an alpha channel of 255, this can produce a blended color with an alpha channel of 254, which is still enough to confuse the grid.Changes
Fixes #4202.