More work on partition stuff #2, added BlkSize struct to handle partition sizes nicely.
This commit is contained in:
@@ -9,6 +9,7 @@ pub fn color_bar<Message: 'static>(
|
||||
let mut c_b = Row::new().height(bar_height);
|
||||
|
||||
if let Some(items) = maybe_items {
|
||||
|
||||
for (bar_text, bar_fill, bar_color) in items {
|
||||
c_b = c_b.push(
|
||||
container(text(bar_text).color(Color::BLACK).size(iced::Pixels(14.0)))
|
||||
@@ -16,9 +17,13 @@ pub fn color_bar<Message: 'static>(
|
||||
.width(Length::FillPortion(bar_fill))
|
||||
.style(move |_| container::background(bar_color))
|
||||
.align_x(Alignment::Center)
|
||||
.align_y(Alignment::Center),
|
||||
.align_y(Alignment::Center)
|
||||
.padding(2),
|
||||
);
|
||||
}
|
||||
}
|
||||
c_b.into()
|
||||
container(c_b.spacing(2))
|
||||
.style(container::rounded_box)
|
||||
.padding(3)
|
||||
.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user