ZIm/crates/ui2/src/elements/tool_divider.rs
2023-10-25 16:32:44 +02:00

22 lines
486 B
Rust

use std::marker::PhantomData;
use crate::prelude::*;
#[derive(Element)]
pub struct ToolDivider<S: 'static + Send + Sync> {
state_type: PhantomData<S>,
}
impl<S: 'static + Send + Sync> ToolDivider<S> {
pub fn new() -> Self {
Self {
state_type: PhantomData,
}
}
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
let theme = theme(cx);
div().w_px().h_3().bg(theme.border)
}
}