mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Formatting
This commit is contained in:
parent
cd2f3ddd70
commit
951f564895
@ -330,7 +330,7 @@ impl GpuController {
|
||||
Ok(a) => Some(a.trim().parse::<u64>().unwrap() / 1024 / 1024),
|
||||
Err(_) => None,
|
||||
};
|
||||
|
||||
|
||||
let gpu_usage = match fs::read_to_string(self.hw_path.join("gpu_busy_percent")) {
|
||||
Ok(a) => Some(a.trim().parse::<u8>().unwrap()),
|
||||
Err(_) => None,
|
||||
|
@ -100,7 +100,7 @@ impl StatsGrid {
|
||||
|
||||
container.attach(&power_usage_box, 0, 2, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
let gpu_temperature_label = Label::new(None);
|
||||
{
|
||||
let gpu_temperature_box = Box::new(Orientation::Horizontal, 5);
|
||||
@ -173,13 +173,9 @@ impl StatsGrid {
|
||||
stats.power_avg.unwrap_or_else(|| 0),
|
||||
stats.power_cap.unwrap_or_else(|| 0)
|
||||
));
|
||||
self.gpu_temperature_label.set_markup(&format!(
|
||||
"<b>{}°C</b>",
|
||||
stats.gpu_temp.unwrap_or_default()
|
||||
));
|
||||
self.gpu_usage_label.set_markup(&format!(
|
||||
"<b>{}%</b>",
|
||||
stats.gpu_usage.unwrap_or_default()
|
||||
));
|
||||
self.gpu_temperature_label
|
||||
.set_markup(&format!("<b>{}°C</b>", stats.gpu_temp.unwrap_or_default()));
|
||||
self.gpu_usage_label
|
||||
.set_markup(&format!("<b>{}%</b>", stats.gpu_usage.unwrap_or_default()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user