gpui: Fix blending of colors in HighlightStyle::highlight (#37666)
Whilst looking into adding support for RainbowBrackes, we stumbled upon this: Whereas for all properties during this blending, we take the value of `other` if it is set, for the color we actually take `self.color` instead of `other.color` if `self.color` is at full opacity. `Hsla::blend` returns the latter color if it is at full opacity, which seems wrong for this case. Hence, this PR swaps these. Will not merge before the next release, to ensure that we don't break something somewhere unexpected. Release Notes: - N/A
This commit is contained in:
@@ -23817,8 +23817,7 @@ pub fn styled_runs_for_code_label<'a>(
|
||||
} else {
|
||||
return Default::default();
|
||||
};
|
||||
let mut muted_style = style;
|
||||
muted_style.highlight(fade_out);
|
||||
let muted_style = style.highlight(fade_out);
|
||||
|
||||
let mut runs = SmallVec::<[(Range<usize>, HighlightStyle); 3]>::new();
|
||||
if range.start >= label.filter_range.end {
|
||||
|
||||
Reference in New Issue
Block a user