File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -478,17 +478,19 @@ impl cosmic::Application for Window {
478
478
let mut elements = Vec :: new ( ) ;
479
479
480
480
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
+
492
494
elements. push (
493
495
horizontal_rule ( 2 )
494
496
. width ( self . core . applet . suggested_size ( true ) . 0 )
You can’t perform that action at this time.
0 commit comments