Represent theme's syntax colors with string keys
Co-authored-by: Marshall Bowers <marshall@zed.dev>
This commit is contained in:
co-authored by
Marshall Bowers
parent
a569c82492
commit
0eae962abf
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
black, phi, point, rems, AbsoluteLength, BorrowAppContext, BorrowWindow, Bounds, ContentMask,
|
||||
Corners, CornersRefinement, DefiniteLength, Edges, EdgesRefinement, Font, FontFeatures,
|
||||
FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Rems, Result,
|
||||
FontStyle, FontWeight, Hsla, Length, Pixels, Point, PointRefinement, Rems, Result, Rgba,
|
||||
SharedString, Size, SizeRefinement, Styled, TextRun, ViewContext, WindowContext,
|
||||
};
|
||||
use refineable::{Cascade, Refineable};
|
||||
@@ -417,3 +417,12 @@ impl From<Hsla> for HighlightStyle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Rgba> for HighlightStyle {
|
||||
fn from(color: Rgba) -> Self {
|
||||
Self {
|
||||
color: Some(color.into()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user