Skip to content

Commit 9db703e

Browse files
committed
made date format in vertical mode look better
1 parent 3670f12 commit 9db703e

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

cosmic-applet-time/src/window.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -478,17 +478,19 @@ impl cosmic::Application for Window {
478478
let mut elements = Vec::new();
479479

480480
if self.config.show_date_in_top_panel {
481-
let mut date_bag = Bag::empty();
482-
483-
date_bag.day = Some(components::Day::NumericDayOfMonth);
484-
date_bag.month = Some(components::Month::Short);
485-
486-
let formated = self.format(date_bag, &self.now);
487-
488-
for p in formated.split_whitespace() {
489-
elements.push(self.core.applet.text(p.to_owned()).into());
490-
}
491-
481+
elements.push(
482+
self.core
483+
.applet
484+
.text(format!("{:02}", self.now.day()))
485+
.into(),
486+
);
487+
elements.push(
488+
self.core
489+
.applet
490+
.text(format!("{:02}", self.now.month()))
491+
.into(),
492+
);
493+
492494
elements.push(
493495
horizontal_rule(2)
494496
.width(self.core.applet.suggested_size(true).0)

0 commit comments

Comments
 (0)