ISSUE#1874

1. Calendar. Weeks. Fix right paddings when first days of the week is
Monday
2. Fix small perfomrance penalty(avoid of defining parameter in the
month loop)
3. Small name convention for format string variables
This commit is contained in:
Viktar Lukashonak
2022-12-14 16:43:23 +03:00
parent b5c686c0dd
commit 0079092699
2 changed files with 21 additions and 15 deletions

View File

@ -33,8 +33,9 @@ class Clock : public ALabel {
bool handleScroll(GdkEventScroll* e);
std::string weeks_format_;
int weeks_format_left_gaps{0};
std::string fmt_str_weeks_;
std::string fmt_str_calendar_;
int fmt_weeks_left_pad_{0};
auto calendar_text(const waybar_time& wtime) -> std::string;
auto weekdays_header(const date::weekday& first_dow, std::ostream& os) -> void;
auto first_day_of_week() -> date::weekday;