diff --git a/cosmic-applet-time/src/window.rs b/cosmic-applet-time/src/window.rs index 0ade58e8..5ceb3cbc 100644 --- a/cosmic-applet-time/src/window.rs +++ b/cosmic-applet-time/src/window.rs @@ -478,16 +478,18 @@ impl cosmic::Application for Window { let mut elements = Vec::new(); if self.config.show_date_in_top_panel { - let mut date_bag = Bag::empty(); - - date_bag.day = Some(components::Day::NumericDayOfMonth); - date_bag.month = Some(components::Month::Short); - - let formated = self.format(date_bag, &self.now); - - for p in formated.split_whitespace() { - elements.push(self.core.applet.text(p.to_owned()).into()); - } + elements.push( + self.core + .applet + .text(format!("{:02}", self.now.month())) + .into(), + ); + elements.push( + self.core + .applet + .text(format!("{:02}", self.now.day())) + .into(), + ); elements.push( horizontal_rule(2) @@ -500,6 +502,10 @@ impl cosmic::Application for Window { time_bag.hour = Some(components::Numeric::Numeric); time_bag.minute = Some(components::Numeric::Numeric); + time_bag.second = self + .config + .show_seconds + .then_some(components::Numeric::Numeric); let hour_cycle = if self.config.military_time { preferences::HourCycle::H23