Account status
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::{unit::Rect, widget::Widget};
|
||||
|
||||
pub struct Dynamic(pub fn(Rect) -> Box<dyn Widget>);
|
||||
pub struct Dynamic<W: Widget>(pub fn(Rect) -> W);
|
||||
|
||||
impl Widget for Dynamic {
|
||||
impl<W: Widget> Widget for Dynamic<W> {
|
||||
fn render(&self, scope: &mut crate::render::RenderScope) {
|
||||
(self.0)(scope.rect).render(scope);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user