From d38f1588d0afb6194a68dc57b4f7fee6c9e05473 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Sun, 7 Mar 2021 19:52:54 +0200 Subject: [PATCH] Make temperatures display vertical and sorted --- gui/src/app/root_stack/thermals_page.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/src/app/root_stack/thermals_page.rs b/gui/src/app/root_stack/thermals_page.rs index 1dc4add..f56fbd8 100644 --- a/gui/src/app/root_stack/thermals_page.rs +++ b/gui/src/app/root_stack/thermals_page.rs @@ -39,7 +39,7 @@ impl ThermalsPage { grid.attach( &{ - let label = Label::new(Some("Temperature:")); + let label = Label::new(Some("Temperatures:")); label.set_halign(Align::End); label }, @@ -136,8 +136,10 @@ impl ThermalsPage { temperatures.push(format!("{}: {}°C", label, temp.current)); } + temperatures.sort(); + if !temperatures.is_empty() { - temperatures.join(" ") + temperatures.join("\n") } else { String::from("No sensors found") }