1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:47:36 +00:00

LibGUI: Shade Weekends in a slightly different background color

Now, weekends can finally be displayed in the Calender Widget as they
are supposed to. They even update when the settings are changed!
This commit is contained in:
Tobias Christiansen 2022-10-04 12:38:44 +02:00 committed by Tim Flynn
parent 170b8cad04
commit 4fdd916f26
2 changed files with 36 additions and 13 deletions

View file

@ -92,6 +92,18 @@ private:
virtual void doubleclick_event(MouseEvent&) override;
virtual void leave_event(Core::Event&) override;
enum class DayOfWeek {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};
bool is_day_in_weekend(DayOfWeek);
struct Day {
String name;
int width { 0 };
@ -138,15 +150,6 @@ private:
Gfx::IntSize m_month_size[12];
Mode m_mode { Month };
enum class DayOfWeek {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};
DayOfWeek m_first_day_of_week { DayOfWeek::Sunday };
DayOfWeek m_first_day_of_weekend { DayOfWeek::Saturday };
int m_weekend_length { 2 };