mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-25 05:30:22 +00:00
refactor: remove TypedBuilder for col (#1162)
* refactor: remove TypedBuilder for col * clean up basic
This commit is contained in:
parent
b6f9a9a98d
commit
8a49c49267
2 changed files with 218 additions and 196 deletions
|
@ -535,185 +535,167 @@ impl BottomLayout {
|
||||||
|
|
||||||
pub fn init_basic_default(use_battery: bool) -> Self {
|
pub fn init_basic_default(use_battery: bool) -> Self {
|
||||||
let table_widgets = if use_battery {
|
let table_widgets = if use_battery {
|
||||||
vec![
|
let disk_widget = BottomWidget::new(BottomWidgetType::Disk, 4)
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::Disk,
|
|
||||||
4,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.left_neighbour(Some(8))
|
.left_neighbour(Some(8))
|
||||||
.right_neighbour(Some(DEFAULT_WIDGET_ID + 2))])
|
.right_neighbour(Some(DEFAULT_WIDGET_ID + 2));
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build(),
|
let proc_sort = BottomWidget::new(BottomWidgetType::ProcSort, DEFAULT_WIDGET_ID + 2)
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![
|
|
||||||
BottomColRow::new(vec![
|
|
||||||
BottomWidget::new(BottomWidgetType::ProcSort, DEFAULT_WIDGET_ID + 2)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
||||||
.left_neighbour(Some(4))
|
.left_neighbour(Some(4))
|
||||||
.right_neighbour(Some(DEFAULT_WIDGET_ID))
|
.right_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.width_ratio(1)
|
.width_ratio(1)
|
||||||
.parent_reflector(Some((WidgetDirection::Right, 2))),
|
.parent_reflector(Some((WidgetDirection::Right, 2)));
|
||||||
BottomWidget::new(BottomWidgetType::Proc, DEFAULT_WIDGET_ID)
|
|
||||||
|
let proc = BottomWidget::new(BottomWidgetType::Proc, DEFAULT_WIDGET_ID)
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
||||||
.left_neighbour(Some(DEFAULT_WIDGET_ID + 2))
|
.left_neighbour(Some(DEFAULT_WIDGET_ID + 2))
|
||||||
.right_neighbour(Some(7))
|
.right_neighbour(Some(7))
|
||||||
.width_ratio(2),
|
.width_ratio(2);
|
||||||
])
|
|
||||||
.canvas_handle_height(true)
|
let proc_search =
|
||||||
.total_widget_ratio(3),
|
BottomWidget::new(BottomWidgetType::ProcSearch, DEFAULT_WIDGET_ID + 1)
|
||||||
BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::ProcSearch,
|
|
||||||
DEFAULT_WIDGET_ID + 1,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(DEFAULT_WIDGET_ID))
|
.up_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.left_neighbour(Some(4))
|
.left_neighbour(Some(4))
|
||||||
.right_neighbour(Some(7))
|
.right_neighbour(Some(7))
|
||||||
.parent_reflector(Some((WidgetDirection::Up, 1)))])
|
.parent_reflector(Some((WidgetDirection::Up, 1)));
|
||||||
.canvas_handle_height(true),
|
|
||||||
])
|
let temp = BottomWidget::new(BottomWidgetType::Temp, 7)
|
||||||
.build(),
|
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::Temp,
|
|
||||||
7,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.left_neighbour(Some(DEFAULT_WIDGET_ID))
|
.left_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.right_neighbour(Some(8))])
|
.right_neighbour(Some(8));
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build(),
|
let battery = BottomWidget::new(BottomWidgetType::Battery, 8)
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::Battery,
|
|
||||||
8,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.left_neighbour(Some(7))
|
.left_neighbour(Some(7))
|
||||||
.right_neighbour(Some(4))])
|
.right_neighbour(Some(4));
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build(),
|
vec![
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![disk_widget]).canvas_handle_height(true)
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![proc_sort, proc])
|
||||||
|
.canvas_handle_height(true)
|
||||||
|
.total_widget_ratio(3),
|
||||||
|
BottomColRow::new(vec![proc_search]).canvas_handle_height(true),
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![temp]).canvas_handle_height(true)
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![battery]).canvas_handle_height(true)
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
vec![
|
let disk = BottomWidget::new(BottomWidgetType::Disk, 4)
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::Disk,
|
|
||||||
4,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.left_neighbour(Some(7))
|
.left_neighbour(Some(7))
|
||||||
.right_neighbour(Some(DEFAULT_WIDGET_ID + 2))])
|
.right_neighbour(Some(DEFAULT_WIDGET_ID + 2));
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build(),
|
let proc_sort = BottomWidget::new(BottomWidgetType::ProcSort, DEFAULT_WIDGET_ID + 2)
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![
|
|
||||||
BottomColRow::new(vec![
|
|
||||||
BottomWidget::new(BottomWidgetType::ProcSort, DEFAULT_WIDGET_ID + 2)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
||||||
.left_neighbour(Some(4))
|
.left_neighbour(Some(4))
|
||||||
.right_neighbour(Some(DEFAULT_WIDGET_ID))
|
.right_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.parent_reflector(Some((WidgetDirection::Right, 2))),
|
.parent_reflector(Some((WidgetDirection::Right, 2)));
|
||||||
BottomWidget::new(BottomWidgetType::Proc, DEFAULT_WIDGET_ID)
|
|
||||||
|
let proc = BottomWidget::new(BottomWidgetType::Proc, DEFAULT_WIDGET_ID)
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
.down_neighbour(Some(DEFAULT_WIDGET_ID + 1))
|
||||||
.left_neighbour(Some(DEFAULT_WIDGET_ID + 2))
|
.left_neighbour(Some(DEFAULT_WIDGET_ID + 2))
|
||||||
.right_neighbour(Some(7)),
|
.right_neighbour(Some(7));
|
||||||
])
|
|
||||||
.canvas_handle_height(true),
|
let proc_search =
|
||||||
BottomColRow::new(vec![BottomWidget::new(
|
BottomWidget::new(BottomWidgetType::ProcSearch, DEFAULT_WIDGET_ID + 1)
|
||||||
BottomWidgetType::ProcSearch,
|
|
||||||
DEFAULT_WIDGET_ID + 1,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(DEFAULT_WIDGET_ID))
|
.up_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.left_neighbour(Some(4))
|
.left_neighbour(Some(4))
|
||||||
.right_neighbour(Some(7))
|
.right_neighbour(Some(7))
|
||||||
.parent_reflector(Some((WidgetDirection::Up, 1)))])
|
.parent_reflector(Some((WidgetDirection::Up, 1)));
|
||||||
.canvas_handle_height(true),
|
|
||||||
])
|
let temp = BottomWidget::new(BottomWidgetType::Temp, 7)
|
||||||
.build(),
|
|
||||||
BottomCol::builder()
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
|
||||||
BottomWidgetType::Temp,
|
|
||||||
7,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
.canvas_handle_width(true)
|
||||||
.up_neighbour(Some(100))
|
.up_neighbour(Some(100))
|
||||||
.left_neighbour(Some(DEFAULT_WIDGET_ID))
|
.left_neighbour(Some(DEFAULT_WIDGET_ID))
|
||||||
.right_neighbour(Some(4))])
|
.right_neighbour(Some(4));
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build(),
|
vec![
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![disk]).canvas_handle_height(true)
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![proc_sort, proc]).canvas_handle_height(true),
|
||||||
|
BottomColRow::new(vec![proc_search]).canvas_handle_height(true),
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
|
BottomCol::new(vec![
|
||||||
|
BottomColRow::new(vec![temp]).canvas_handle_height(true)
|
||||||
|
])
|
||||||
|
.canvas_handle_width(true),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let cpu = BottomWidget::new(BottomWidgetType::BasicCpu, 1)
|
||||||
|
.canvas_handle_width(true)
|
||||||
|
.down_neighbour(Some(2));
|
||||||
|
|
||||||
|
let mem = BottomWidget::new(BottomWidgetType::BasicMem, 2)
|
||||||
|
.canvas_handle_width(true)
|
||||||
|
.up_neighbour(Some(1))
|
||||||
|
.down_neighbour(Some(100))
|
||||||
|
.right_neighbour(Some(3));
|
||||||
|
|
||||||
|
let net = BottomWidget::new(BottomWidgetType::BasicNet, 3)
|
||||||
|
.canvas_handle_width(true)
|
||||||
|
.up_neighbour(Some(1))
|
||||||
|
.down_neighbour(Some(100))
|
||||||
|
.left_neighbour(Some(2));
|
||||||
|
|
||||||
|
let table = BottomWidget::new(BottomWidgetType::BasicTables, 100)
|
||||||
|
.canvas_handle_width(true)
|
||||||
|
.up_neighbour(Some(2));
|
||||||
|
|
||||||
BottomLayout {
|
BottomLayout {
|
||||||
total_row_height_ratio: 3,
|
total_row_height_ratio: 3,
|
||||||
rows: vec![
|
rows: vec![
|
||||||
BottomRow::builder()
|
BottomRow::builder()
|
||||||
.canvas_handle_height(true)
|
.canvas_handle_height(true)
|
||||||
.children(vec![BottomCol::builder()
|
.children(vec![BottomCol::new(vec![
|
||||||
.canvas_handle_width(true)
|
BottomColRow::new(vec![cpu]).canvas_handle_height(true)
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
])
|
||||||
BottomWidgetType::BasicCpu,
|
.canvas_handle_width(true)])
|
||||||
1,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.down_neighbour(Some(2))])
|
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build()])
|
|
||||||
.build(),
|
.build(),
|
||||||
BottomRow::builder()
|
BottomRow::builder()
|
||||||
.canvas_handle_height(true)
|
.canvas_handle_height(true)
|
||||||
.children(vec![BottomCol::builder()
|
.children(vec![BottomCol::new(vec![BottomColRow::new(vec![
|
||||||
.canvas_handle_width(true)
|
mem, net,
|
||||||
.children(vec![BottomColRow::new(vec![
|
|
||||||
BottomWidget::new(BottomWidgetType::BasicMem, 2)
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.up_neighbour(Some(1))
|
|
||||||
.down_neighbour(Some(100))
|
|
||||||
.right_neighbour(Some(3)),
|
|
||||||
BottomWidget::new(BottomWidgetType::BasicNet, 3)
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.up_neighbour(Some(1))
|
|
||||||
.down_neighbour(Some(100))
|
|
||||||
.left_neighbour(Some(2)),
|
|
||||||
])
|
])
|
||||||
.canvas_handle_height(true)])
|
.canvas_handle_height(true)])
|
||||||
.build()])
|
.canvas_handle_width(true)])
|
||||||
.build(),
|
.build(),
|
||||||
BottomRow::builder()
|
BottomRow::builder()
|
||||||
.canvas_handle_height(true)
|
.canvas_handle_height(true)
|
||||||
.children(vec![BottomCol::builder()
|
.children(vec![BottomCol::new(vec![
|
||||||
.canvas_handle_width(true)
|
BottomColRow::new(vec![table]).canvas_handle_height(true)
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
])
|
||||||
BottomWidgetType::BasicTables,
|
.canvas_handle_width(true)])
|
||||||
100,
|
|
||||||
)
|
|
||||||
.canvas_handle_width(true)
|
|
||||||
.up_neighbour(Some(2))])
|
|
||||||
.canvas_handle_height(true)])
|
|
||||||
.build()])
|
|
||||||
.build(),
|
.build(),
|
||||||
BottomRow::builder()
|
BottomRow::builder()
|
||||||
.canvas_handle_height(true)
|
.canvas_handle_height(true)
|
||||||
|
@ -724,6 +706,28 @@ impl BottomLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pub enum BottomLayoutNode {
|
||||||
|
// Container(BottomContainer),
|
||||||
|
// Widget(BottomWidget),
|
||||||
|
// }
|
||||||
|
|
||||||
|
// pub struct BottomContainer {
|
||||||
|
// children: Vec<BottomLayoutNode>,
|
||||||
|
// root_ratio: u32,
|
||||||
|
// growth_type: BottomLayoutNodeSizing,
|
||||||
|
// }
|
||||||
|
|
||||||
|
// pub enum BottomContainerType {
|
||||||
|
// Row,
|
||||||
|
// Col,
|
||||||
|
// }
|
||||||
|
|
||||||
|
// pub enum BottomLayoutNodeSizing {
|
||||||
|
// Ratio(u32),
|
||||||
|
// CanvasHandles,
|
||||||
|
// FlexGrow,
|
||||||
|
// }
|
||||||
|
|
||||||
/// Represents a single row in the layout.
|
/// Represents a single row in the layout.
|
||||||
#[derive(Clone, Debug, TypedBuilder)]
|
#[derive(Clone, Debug, TypedBuilder)]
|
||||||
pub struct BottomRow {
|
pub struct BottomRow {
|
||||||
|
@ -745,23 +749,47 @@ pub struct BottomRow {
|
||||||
/// Represents a single column in the layout. We assume that even if the column
|
/// Represents a single column in the layout. We assume that even if the column
|
||||||
/// contains only ONE element, it is still a column (rather than either a col or
|
/// contains only ONE element, it is still a column (rather than either a col or
|
||||||
/// a widget, as per the config, for simplicity's sake).
|
/// a widget, as per the config, for simplicity's sake).
|
||||||
#[derive(Clone, Debug, TypedBuilder)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct BottomCol {
|
pub struct BottomCol {
|
||||||
pub children: Vec<BottomColRow>,
|
pub children: Vec<BottomColRow>,
|
||||||
|
|
||||||
#[builder(default = 1)]
|
|
||||||
pub total_col_row_ratio: u32,
|
pub total_col_row_ratio: u32,
|
||||||
|
|
||||||
#[builder(default = 1)]
|
|
||||||
pub col_width_ratio: u32,
|
pub col_width_ratio: u32,
|
||||||
|
|
||||||
#[builder(default = false)]
|
|
||||||
pub canvas_handle_width: bool,
|
pub canvas_handle_width: bool,
|
||||||
|
|
||||||
#[builder(default = false)]
|
|
||||||
pub flex_grow: bool,
|
pub flex_grow: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl BottomCol {
|
||||||
|
pub fn new(children: Vec<BottomColRow>) -> Self {
|
||||||
|
Self {
|
||||||
|
children,
|
||||||
|
total_col_row_ratio: 1,
|
||||||
|
col_width_ratio: 1,
|
||||||
|
canvas_handle_width: false,
|
||||||
|
flex_grow: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn total_col_row_ratio(mut self, total_col_row_ratio: u32) -> Self {
|
||||||
|
self.total_col_row_ratio = total_col_row_ratio;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn col_width_ratio(mut self, col_width_ratio: u32) -> Self {
|
||||||
|
self.col_width_ratio = col_width_ratio;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn canvas_handle_width(mut self, canvas_handle_width: bool) -> Self {
|
||||||
|
self.canvas_handle_width = canvas_handle_width;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn flex_grow(mut self, flex_grow: bool) -> Self {
|
||||||
|
self.flex_grow = flex_grow;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug)]
|
#[derive(Clone, Default, Debug)]
|
||||||
pub struct BottomColRow {
|
pub struct BottomColRow {
|
||||||
pub children: Vec<BottomWidget>,
|
pub children: Vec<BottomWidget>,
|
||||||
|
|
|
@ -98,18 +98,15 @@ impl Row {
|
||||||
}
|
}
|
||||||
|
|
||||||
children.push(match widget_type {
|
children.push(match widget_type {
|
||||||
BottomWidgetType::Cpu => BottomCol::builder()
|
BottomWidgetType::Cpu => {
|
||||||
|
BottomCol::new(vec![new_cpu(left_legend, iter_id)])
|
||||||
.col_width_ratio(width_ratio)
|
.col_width_ratio(width_ratio)
|
||||||
.children(vec![new_cpu(left_legend, iter_id)])
|
}
|
||||||
.build(),
|
|
||||||
BottomWidgetType::Proc => {
|
BottomWidgetType::Proc => {
|
||||||
let proc_id = *iter_id;
|
let proc_id = *iter_id;
|
||||||
let proc_search_id = *iter_id + 1;
|
let proc_search_id = *iter_id + 1;
|
||||||
*iter_id += 2;
|
*iter_id += 2;
|
||||||
BottomCol::builder()
|
BottomCol::new(vec![
|
||||||
.total_col_row_ratio(2)
|
|
||||||
.col_width_ratio(width_ratio)
|
|
||||||
.children(vec![
|
|
||||||
BottomColRow::new(vec![
|
BottomColRow::new(vec![
|
||||||
new_proc_sort(*iter_id),
|
new_proc_sort(*iter_id),
|
||||||
new_proc(proc_id),
|
new_proc(proc_id),
|
||||||
|
@ -119,15 +116,14 @@ impl Row {
|
||||||
BottomColRow::new(vec![new_proc_search(proc_search_id)])
|
BottomColRow::new(vec![new_proc_search(proc_search_id)])
|
||||||
.canvas_handle_height(true),
|
.canvas_handle_height(true),
|
||||||
])
|
])
|
||||||
.build()
|
.total_col_row_ratio(2)
|
||||||
}
|
|
||||||
_ => BottomCol::builder()
|
|
||||||
.col_width_ratio(width_ratio)
|
.col_width_ratio(width_ratio)
|
||||||
.children(vec![BottomColRow::new(vec![BottomWidget::new(
|
}
|
||||||
|
_ => BottomCol::new(vec![BottomColRow::new(vec![BottomWidget::new(
|
||||||
widget_type,
|
widget_type,
|
||||||
*iter_id,
|
*iter_id,
|
||||||
)])])
|
)])])
|
||||||
.build(),
|
.col_width_ratio(width_ratio),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
RowChildren::Col { ratio, child } => {
|
RowChildren::Col { ratio, child } => {
|
||||||
|
@ -213,11 +209,9 @@ impl Row {
|
||||||
}
|
}
|
||||||
|
|
||||||
children.push(
|
children.push(
|
||||||
BottomCol::builder()
|
BottomCol::new(col_row_children)
|
||||||
.total_col_row_ratio(total_col_row_ratio)
|
.total_col_row_ratio(total_col_row_ratio)
|
||||||
.col_width_ratio(col_width_ratio)
|
.col_width_ratio(col_width_ratio),
|
||||||
.children(col_row_children)
|
|
||||||
.build(),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue