Touching up the application #200

Merged
savanni merged 5 commits from fitnesstrax/touchups into main 2024-02-19 23:45:31 +00:00
2 changed files with 6 additions and 7 deletions
Showing only changes of commit 0032f16422 - Show all commits

View File

@ -84,24 +84,24 @@ impl DaySummary {
let row = gtk::Box::builder().build(); let row = gtk::Box::builder().build();
let label = gtk::Label::builder() let weight_label = gtk::Label::builder()
.halign(gtk::Align::Start) .halign(gtk::Align::Start)
.css_classes(["day-summary__weight"]) .css_classes(["day-summary__weight"])
.build(); .build();
if let Some(w) = view_model.weight() { if let Some(w) = view_model.weight() {
label.set_label(&w.to_string()) weight_label.set_label(&w.to_string())
} }
let label = gtk::Label::builder() let steps_label = gtk::Label::builder()
.halign(gtk::Align::Start) .halign(gtk::Align::Start)
.css_classes(["day-summary__steps"]) .css_classes(["day-summary__steps"])
.build(); .build();
if let Some(s) = view_model.steps() { if let Some(s) = view_model.steps() {
label.set_label(&format!("{} steps", s)); steps_label.set_label(&format!("{} steps", s));
} }
row.append(&label); row.append(&weight_label);
row.append(&label); row.append(&steps_label);
self.append(&row); self.append(&row);
for activity in TIME_DISTANCE_ACTIVITIES { for activity in TIME_DISTANCE_ACTIVITIES {

View File

@ -145,7 +145,6 @@ impl HistoricalView {
let mut days = interval.days().map(Date::new).collect::<Vec<Date>>(); let mut days = interval.days().map(Date::new).collect::<Vec<Date>>();
days.reverse(); days.reverse();
model.extend(days.into_iter()); model.extend(days.into_iter());
// model.extend(interval.days().map(Date::new));
self.imp() self.imp()
.list_view .list_view
.set_model(Some(&gtk::NoSelection::new(Some(model)))); .set_model(Some(&gtk::NoSelection::new(Some(model))));