month-view: fix DnD highlight
https://bugzilla.gnome.org/show_bug.cgi?id=771115
This commit is contained in:
@@ -32,10 +32,6 @@ calendar-view.current {
|
|||||||
background-color: alpha(@theme_selected_bg_color, 0.3);
|
background-color: alpha(@theme_selected_bg_color, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
calendar-view.current:drop(active) {
|
|
||||||
background-color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
calendar-view:selected {
|
calendar-view:selected {
|
||||||
color: @theme_selected_bg_color;
|
color: @theme_selected_bg_color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -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 &&
|
if (priv->date->year == priv->current_date->year && priv->date->month == priv->current_date->month &&
|
||||||
j == priv->current_date->day)
|
j == priv->current_date->day)
|
||||||
{
|
{
|
||||||
PangoLayout *clayout;
|
|
||||||
PangoFontDescription *cfont_desc;
|
PangoFontDescription *cfont_desc;
|
||||||
|
PangoLayout *clayout;
|
||||||
|
|
||||||
gtk_style_context_save (context);
|
gtk_style_context_save (context);
|
||||||
gtk_style_context_add_class (context, "current");
|
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);
|
clayout = gtk_widget_create_pango_layout (widget, nr_day);
|
||||||
gtk_style_context_get (context, state, "font", &cfont_desc, NULL);
|
gtk_style_context_get (context, state, "font", &cfont_desc, NULL);
|
||||||
pango_layout_set_font_description (clayout, cfont_desc);
|
pango_layout_set_font_description (clayout, cfont_desc);
|
||||||
|
|||||||
Reference in New Issue
Block a user