Checkpoint – Broken
This commit is contained in:
parent
b16d37953d
commit
bca97f7186
33 changed files with 183 additions and 127 deletions
|
@ -27,7 +27,7 @@ impl<S: 'static + Send + Sync> Avatar<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
let mut img = img();
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ impl<S: 'static + Send + Sync + Clone> Details<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
div()
|
||||
// .flex()
|
||||
|
@ -60,7 +60,11 @@ mod stories {
|
|||
}
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(
|
||||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Details<S>>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -177,7 +177,7 @@ impl<S: 'static + Send + Sync> IconElement<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
let fill = self.color.color(theme);
|
||||
let svg_size = match self.size {
|
||||
IconSize::Small => ui_size(12. / 14.),
|
||||
|
|
|
@ -46,7 +46,7 @@ impl<S: 'static + Send + Sync> Input<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
let text_el;
|
||||
let text_color;
|
||||
|
|
|
@ -22,7 +22,7 @@ pub enum LabelColor {
|
|||
|
||||
impl LabelColor {
|
||||
pub fn hsla(&self, cx: &WindowContext) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
match self {
|
||||
Self::Default => theme.middle.base.default.foreground,
|
||||
|
@ -82,7 +82,7 @@ impl<S: 'static + Send + Sync + Clone> Label<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
div()
|
||||
.when(self.strikethrough, |this| {
|
||||
|
@ -136,7 +136,7 @@ impl<S: 'static + Send + Sync + Clone> HighlightedLabel<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
let highlight_color = theme.lowest.accent.default.foreground;
|
||||
|
||||
|
|
|
@ -139,13 +139,13 @@ impl Player {
|
|||
}
|
||||
|
||||
pub fn cursor_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
let index = self.index % 8;
|
||||
theme.players[self.index].cursor
|
||||
}
|
||||
|
||||
pub fn selection_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
let index = self.index % 8;
|
||||
theme.players[self.index].selection
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ impl<S: 'static + Send + Sync> ToolDivider<S> {
|
|||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
let theme = theme(cx);
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
div().w_px().h_3().bg(theme.lowest.base.default.border)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue