cleanup elements #13
This commit is contained in:
+9
-9
@@ -10,6 +10,15 @@ pub struct Div {
|
||||
size: (u16, u16),
|
||||
}
|
||||
|
||||
impl Div {
|
||||
pub fn new() -> Self {
|
||||
Div {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Element for Div {
|
||||
fn render(&mut self, scope: &mut crate::render_scope::RenderScope) {
|
||||
let (width, height) = scope.get_size_or(self.size.0, self.size.1);
|
||||
@@ -59,12 +68,3 @@ impl Element for Div {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Div {
|
||||
pub fn new() -> Self {
|
||||
Div {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user