Skip to content

Commit

Permalink
fixed examples build
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC authored and Joylei committed Feb 21, 2023
1 parent 17780b7 commit d795e5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/cpu-monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct SystemChart {
last_sample_time: Instant,
items_per_row: usize,
processors: Vec<CpuUsageChart>,
chart_height: u16,
chart_height: f32,
}

impl Default for SystemChart {
Expand All @@ -132,7 +132,7 @@ impl Default for SystemChart {
last_sample_time: Instant::now(),
items_per_row: 3,
processors: Default::default(),
chart_height: 300,
chart_height: 300.0,
}
}
}
Expand Down Expand Up @@ -190,7 +190,7 @@ impl SystemChart {
.spacing(15)
.padding(20)
.width(Length::Fill)
.height(Length::Units(chart_height))
.height(Length::Fixed(chart_height))
.align_items(Alignment::Center);
for item in chunk {
row = row.push(item.view(idx));
Expand Down

0 comments on commit d795e5f

Please sign in to comment.