EpisodeWidget: Trim date label to avoid date/title miss alignment on single digit dates.
This commit is contained in:
parent
65a2d666a3
commit
d8d4b08252
@ -151,9 +151,10 @@ impl EpisodeWidget {
|
|||||||
let now = Utc::now();
|
let now = Utc::now();
|
||||||
let date = Utc.timestamp(i64::from(epoch), 0);
|
let date = Utc.timestamp(i64::from(epoch), 0);
|
||||||
if now.year() == date.year() {
|
if now.year() == date.year() {
|
||||||
self.date.set_text(&date.format("%e %b").to_string());
|
self.date.set_text(&date.format("%e %b").to_string().trim());
|
||||||
} else {
|
} else {
|
||||||
self.date.set_text(&date.format("%e %b %Y").to_string());
|
self.date
|
||||||
|
.set_text(&date.format("%e %b %Y").to_string().trim());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user