Merge pull request #1998 from LukashonakV/Clock_revision

This commit is contained in:
Alex 2023-02-09 09:32:57 +01:00 committed by GitHub
commit a6eaaad97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,9 +281,7 @@ auto getCalendarLine(date::year_month_day const currDate, date::year_month const
switch (line) { switch (line) {
case 0: { case 0: {
// Output month and year title // Output month and year title
Glib::ustring wd_ustring{ res << date::format(*locale_, "%B %Y", ym);
Glib::ustring::format(std::left, date::format(*locale_, "%B %Y", ym), std::right)};
res << wd_ustring;
break; break;
} }
case 1: { case 1: {
@ -418,7 +416,7 @@ auto waybar::modules::Clock::get_calendar(const date::zoned_seconds& now,
} }
os << fmt::format( os << fmt::format(
fmt::runtime((cldWPos_ == WeeksSide::RIGHT || line == 0) ? "{:<{}}" : "{:>{}}"), fmt::runtime((cldWPos_ != WeeksSide::LEFT || line == 0) ? "{:<{}}" : "{:>{}}"),
getCalendarLine(currDate, ymTmp, line, firstdow, &locale_), getCalendarLine(currDate, ymTmp, line, firstdow, &locale_),
(cldMonColLen_ + ((line < 2) ? cldWnLen_ : 0))); (cldMonColLen_ + ((line < 2) ? cldWnLen_ : 0)));