Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Implement From<Rgba> for Fill

Nathan Soboaaada7d5087b
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index 58e7ddc3829..385c6f52394 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -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,
diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rs
index 7e9504d4346..244ccebf249 100644
--- a/crates/gpui/src/style.rs
+++ b/crates/gpui/src/style.rs
@@ -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)