Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add debugging colors to styled_ext
Nate Butlercb0880cf3c45
diff --git a/crates/ui2/src/styled_ext.rs b/crates/ui2/src/styled_ext.rsindex e567830d6ca..63711cbaf9a 100644--- a/crates/ui2/src/styled_ext.rs+++ b/crates/ui2/src/styled_ext.rs@@ -1,4 +1,4 @@-use gpui::{px, Styled, WindowContext};+use gpui::{hsla, px, Styled, WindowContext};use settings::Settings;use theme::ThemeSettings;@@ -104,6 +104,30 @@ pub trait StyledExt: Styled + Sized {fn elevation_3(self, cx: &mut WindowContext) -> Self {elevated(self, cx, ElevationIndex::ModalSurface)}++ fn debug_bg_red(self) -> Self {+ self.bg(gpui::red())+ }++ fn debug_bg_green(self) -> Self {+ self.bg(gpui::green())+ }++ fn debug_bg_blue(self) -> Self {+ self.bg(gpui::blue())+ }++ fn debug_bg_yellow(self) -> Self {+ self.bg(hsla(60. / 360., 1., 0.5, 1.))+ }++ fn debug_bg_cyan(self) -> Self {+ self.bg(hsla(160. / 360., 1., 0.5, 1.))+ }++ fn debug_bg_magenta(self) -> Self {+ self.bg(hsla(300. / 360., 1., 0.5, 1.))+ }}impl<E: Styled> StyledExt for E {}