mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Make temperatures display vertical and sorted
This commit is contained in:
parent
11ec9f39ad
commit
d38f1588d0
@ -39,7 +39,7 @@ impl ThermalsPage {
|
|||||||
|
|
||||||
grid.attach(
|
grid.attach(
|
||||||
&{
|
&{
|
||||||
let label = Label::new(Some("Temperature:"));
|
let label = Label::new(Some("Temperatures:"));
|
||||||
label.set_halign(Align::End);
|
label.set_halign(Align::End);
|
||||||
label
|
label
|
||||||
},
|
},
|
||||||
@ -136,8 +136,10 @@ impl ThermalsPage {
|
|||||||
temperatures.push(format!("{}: {}°C", label, temp.current));
|
temperatures.push(format!("{}: {}°C", label, temp.current));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
temperatures.sort();
|
||||||
|
|
||||||
if !temperatures.is_empty() {
|
if !temperatures.is_empty() {
|
||||||
temperatures.join(" ")
|
temperatures.join("\n")
|
||||||
} else {
|
} else {
|
||||||
String::from("No sensors found")
|
String::from("No sensors found")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user