diff --git a/src/gui/views/gcal-month-cell.c b/src/gui/views/gcal-month-cell.c
index cf497006..8b46c7e9 100644
--- a/src/gui/views/gcal-month-cell.c
+++ b/src/gui/views/gcal-month-cell.c
@@ -97,6 +97,26 @@ update_style_flags (GcalMonthCell *self)
gtk_widget_remove_css_class (GTK_WIDGET (self), "workday");
}
+static void
+add_month_separators (GcalMonthCell *self)
+{
+ gint day_of_month;
+
+ gtk_widget_remove_css_class (GTK_WIDGET (self), "separator-top");
+ gtk_widget_remove_css_class (GTK_WIDGET (self), "separator-side");
+
+ day_of_month = g_date_time_get_day_of_month (self->date);
+ if (day_of_month > 1 && day_of_month <= 7)
+ {
+ gtk_widget_add_css_class (GTK_WIDGET (self), "separator-top");
+ }
+ else if (day_of_month == 1)
+ {
+ gtk_widget_add_css_class (GTK_WIDGET (self), "separator-side");
+ gtk_widget_add_css_class (GTK_WIDGET (self), "separator-top");
+ }
+}
+
static void
move_event (GcalMonthCell *self,
GcalEvent *event,
@@ -433,6 +453,7 @@ gcal_month_cell_set_date (GcalMonthCell *self,
gtk_label_set_text (self->day_label, text);
update_style_flags (self);
+ add_month_separators (self);
/* Month name */
day_of_month = g_date_time_get_day_of_month (date);
diff --git a/src/theme/style-dark.css b/src/theme/style-dark.css
index 60fba2d3..0fd9cdc9 100644
--- a/src/theme/style-dark.css
+++ b/src/theme/style-dark.css
@@ -40,3 +40,29 @@ monthcell:not(.workday):selected:hover {
background-color: alpha(@accent_bg_color, 0.2);
transition: background-color 200ms;
}
+
+/* Separators */
+monthcell.separator-top,
+monthcell.separator-top:selected {
+ border-top: 1px solid #6b6b6b;
+}
+
+monthcell.separator-side:dir(ltr),
+monthcell.separator-side:selected:dir(ltr) {
+ border-left: 1px solid #6b6b6b;
+}
+
+monthcell:nth-child(7n + 1):dir(ltr),
+monthcell:nth-child(7n + 1):selected:dir(ltr) {
+ border-left-width: 0;
+}
+
+monthcell.separator-side:dir(rtl),
+monthcell.separator-side:selected:dir(rtl) {
+ border-right: 1px solid #6b6b6b;
+}
+
+monthcell:nth-child(7n + 1):dir(rtl),
+monthcell:nth-child(7n + 1):selected:dir(rtl) {
+ border-right-width: 0;
+}
diff --git a/src/theme/style-hc-dark.css b/src/theme/style-hc-dark.css
new file mode 100644
index 00000000..e3ca8362
--- /dev/null
+++ b/src/theme/style-hc-dark.css
@@ -0,0 +1,25 @@
+/* Separators */
+monthcell.separator-top,
+monthcell.separator-top:selected {
+ border-top: 1px solid white;
+}
+
+monthcell.separator-side:dir(ltr),
+monthcell.separator-side:selected:dir(ltr) {
+ border-left: 1px solid white;
+}
+
+monthcell:nth-child(7n + 1):dir(ltr),
+monthcell:nth-child(7n + 1):selected:dir(ltr) {
+ border-left-width: 0;
+}
+
+monthcell.separator-side:dir(rtl),
+monthcell.separator-side:selected:dir(rtl) {
+ border-right: 1px solid white;
+}
+
+monthcell:nth-child(7n + 1):dir(rtl),
+monthcell:nth-child(7n + 1):selected:dir(rtl) {
+ border-right-width: 0;
+}
diff --git a/src/theme/style-hc.css b/src/theme/style-hc.css
index 9822bdec..232a233e 100644
--- a/src/theme/style-hc.css
+++ b/src/theme/style-hc.css
@@ -8,3 +8,28 @@ datechooser .weeknum{
background-color: alpha(@theme_fg_color, 0.05);
border: 1px solid alpha(currentColor, 0.5);
}
+
+monthcell.separator-top,
+monthcell.separator-top:selected {
+ border-top: 1px solid black;
+}
+
+monthcell.separator-side:dir(ltr),
+monthcell.separator-side:selected:dir(ltr) {
+ border-left: 1px solid black;
+}
+
+monthcell:nth-child(7n + 1):dir(ltr),
+monthcell:nth-child(7n + 1):selected:dir(ltr) {
+ border-left-width: 0;
+}
+
+monthcell.separator-side:dir(rtl),
+monthcell.separator-side:selected:dir(rtl) {
+ border-right: 1px solid black;
+}
+
+monthcell:nth-child(7n + 1):dir(rtl),
+monthcell:nth-child(7n + 1):selected:dir(rtl) {
+ border-right-width: 0;
+}
diff --git a/src/theme/style.css b/src/theme/style.css
index b65d3447..6e996eaf 100644
--- a/src/theme/style.css
+++ b/src/theme/style.css
@@ -322,7 +322,6 @@ monthcell:hover {
transition: background-color 200ms;
}
-
/* Today */
monthcell.today { background-color: alpha(@accent_bg_color, 0.15); }
monthcell.today:hover { background-color: alpha(@accent_bg_color, 0.25); }
@@ -340,7 +339,6 @@ monthcell.today label.day-label {
/* Out of Month */
monthcell.out-of-month {
- border-color: alpha(@borders, 0.3);
background-color: alpha(@theme_fg_color, 0.03);
}
@@ -356,9 +354,6 @@ monthcell.out-of-month:not(.today):hover {
monthcell.out-of-month label { color: alpha(@theme_fg_color, 0.4); }
-/* Weekend */
-monthcell:nth-child(7n + 1) { border-left-width: 0; }
-
monthcell:not(.workday) {
background-color: alpha(@theme_fg_color, 0.01);
}
@@ -399,6 +394,32 @@ monthcell button {
border-right: none;
}
+/* Separators */
+monthcell.separator-top,
+monthcell.separator-top:selected {
+ border-top: 1px solid #a4a4a4;
+}
+
+monthcell.separator-side:dir(ltr),
+monthcell.separator-side:selected:dir(ltr) {
+ border-left: 1px solid #a4a4a4;
+}
+
+monthcell:nth-child(7n + 1):dir(ltr),
+monthcell:nth-child(7n + 1):selected:dir(ltr) {
+ border-left-width: 0;
+}
+
+monthcell.separator-side:dir(rtl),
+monthcell.separator-side:selected:dir(rtl) {
+ border-right: 1px solid #a4a4a4;
+}
+
+monthcell:nth-child(7n + 1):dir(rtl),
+monthcell:nth-child(7n + 1):selected:dir(rtl) {
+ border-right-width: 0;
+}
+
/*
* Month row
*/
diff --git a/src/theme/theme.gresource.xml b/src/theme/theme.gresource.xml
index 98501201..004f820c 100644
--- a/src/theme/theme.gresource.xml
+++ b/src/theme/theme.gresource.xml
@@ -4,5 +4,6 @@
style.css
style-dark.css
style-hc.css
+ style-hc-dark.css