diff --git a/crates/gpui/src/elements/cell.rs b/crates/gpui/src/elements/cell.rs index 43fb3a8e7fe0d75e41e73b704b838f9454fde823..1115f799c3ca1a935b149b3122e776b4f638e11f 100644 --- a/crates/gpui/src/elements/cell.rs +++ b/crates/gpui/src/elements/cell.rs @@ -4,55 +4,10 @@ struct Cell {} impl Cell { fn new(style: CellStyle) -> Self { - Self { style } + Self {} } - - fn interactive(style: Interactive) -> Self {} } -impl CellStyle { - fn interactive(self) -> Interactive { - Interactive { - default: self.clone(), - hovered: self.clone(), - active: self.clone(), - disabled: self, - } - } - - fn hover(self, f: impl FnOnce(&mut CellStyle)) -> Interactive { - let mut style = self.interactive(); - f(&mut style.hovered); - style - } -} - -fn foo() { - - struct WidgetStyle { - foo: CellStyle, - bar: CellStyle, - button: Interactive, - } - - let mut header_style = CellStyle::default(); - header_style.fill = Fill::Color(Color::red()); - - let style = CellStyle::default().hover(|style| { - - }) - - let interactive = style.hover(|style| { - style.fill = Fill::Color(Color::red()); - }); - - - style.hover(|style| { - style - .fill(Color(red)) - .text_color(Color(red)); - }) -} struct Interactive