mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-10 05:37:29 +03:00
Add debugging colors to styled_ext
This commit is contained in:
parent
c9dd6b879c
commit
cb0880cf3c
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user