Implement From<Rgba> for Fill

This commit is contained in:
Nathan Sobo 2024-01-05 17:22:59 -07:00
parent 436a281756
commit aaada7d508
2 changed files with 7 additions and 1 deletions

View file

@ -29,7 +29,7 @@ use editor::{
use fs::Fs;
use futures::StreamExt;
use gpui::{
canvas, div, point, relative, rems, rgba, uniform_list, Action, AnyElement, AppContext,
canvas, div, point, relative, rems, uniform_list, Action, AnyElement, AppContext,
AsyncWindowContext, AvailableSpace, ClipboardItem, Context, EventEmitter, FocusHandle,
FocusableView, FontStyle, FontWeight, HighlightStyle, InteractiveElement, IntoElement, Model,
ModelContext, ParentElement, Pixels, PromptLevel, Render, SharedString,

View file

@ -561,6 +561,12 @@ impl From<Hsla> for Fill {
}
}
impl From<Rgba> for Fill {
fn from(color: Rgba) -> Self {
Self::Color(color.into())
}
}
impl From<TextStyle> for HighlightStyle {
fn from(other: TextStyle) -> Self {
Self::from(&other)