diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css index 7fc5f111..6f1ce564 100644 --- a/data/theme/gtk-styles.css +++ b/data/theme/gtk-styles.css @@ -32,10 +32,6 @@ calendar-view.current { background-color: alpha(@theme_selected_bg_color, 0.3); } -calendar-view.current:drop(active) { - background-color: black; -} - calendar-view:selected { color: @theme_selected_bg_color; font-weight: bold; diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index bb8fde2c..166b9f11 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -1776,12 +1776,20 @@ gcal_month_view_draw (GtkWidget *widget, if (priv->date->year == priv->current_date->year && priv->date->month == priv->current_date->month && j == priv->current_date->day) { - PangoLayout *clayout; PangoFontDescription *cfont_desc; + PangoLayout *clayout; gtk_style_context_save (context); gtk_style_context_add_class (context, "current"); + /* + * If the current day is not under a DnD, it's actually not possible + * to *not* show the DnD indicator using only CSS. So we have to fake + * the "I'm not under DnD" state. + */ + if (j != priv->dnd_cell) + gtk_style_context_set_state (context, state & ~GTK_STATE_FLAG_DROP_ACTIVE); + clayout = gtk_widget_create_pango_layout (widget, nr_day); gtk_style_context_get (context, state, "font", &cfont_desc, NULL); pango_layout_set_font_description (clayout, cfont_desc);