summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Calendar.h
diff options
context:
space:
mode:
authorTobias Christiansen <tobyase@serenityos.org>2022-10-04 12:38:44 +0200
committerTim Flynn <trflynn89@pm.me>2022-10-04 12:13:54 -0400
commit4fdd916f2656f8a5f900d4716e44fc98b17d92e6 (patch)
treebb31e2d8ab50855f96f5723a673571a4536580bf /Userland/Libraries/LibGUI/Calendar.h
parent170b8cad04195ed5b19849a367a11c953312de69 (diff)
downloadserenity-4fdd916f2656f8a5f900d4716e44fc98b17d92e6.zip
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!
Diffstat (limited to 'Userland/Libraries/LibGUI/Calendar.h')
-rw-r--r--Userland/Libraries/LibGUI/Calendar.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/Userland/Libraries/LibGUI/Calendar.h b/Userland/Libraries/LibGUI/Calendar.h
index dea9c5f5a6..34c48067ea 100644
--- a/Userland/Libraries/LibGUI/Calendar.h
+++ b/Userland/Libraries/LibGUI/Calendar.h
@@ -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 };