cleanup elements #13
This commit is contained in:
+20
-20
@@ -17,6 +17,26 @@ pub struct FlexCol {
|
||||
size: (u16, u16),
|
||||
}
|
||||
|
||||
impl FlexRow {
|
||||
pub fn new(gap: u16) -> Self {
|
||||
Self {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
gap,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FlexCol {
|
||||
pub fn new(gap: u16) -> Self {
|
||||
Self {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
gap,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Element for FlexRow {
|
||||
fn render(&mut self, scope: &mut crate::render_scope::RenderScope) {
|
||||
let (width, height) = scope.get_size_or(self.size.0, self.size.1);
|
||||
@@ -73,16 +93,6 @@ impl Element for FlexRow {
|
||||
}
|
||||
}
|
||||
|
||||
impl FlexRow {
|
||||
pub fn new(gap: u16) -> Self {
|
||||
Self {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
gap,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Element for FlexCol {
|
||||
fn render(&mut self, scope: &mut crate::render_scope::RenderScope) {
|
||||
let (width, height) = scope.get_size_or(self.size.0, self.size.1);
|
||||
@@ -138,13 +148,3 @@ impl Element for FlexCol {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl FlexCol {
|
||||
pub fn new(gap: u16) -> Self {
|
||||
Self {
|
||||
children: Mutex::new(Vec::new()),
|
||||
size: (0, 0),
|
||||
gap,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user