month-view: properly handle all-day events
Note: when the marking of break events is made, this have to be taken into account.
This commit is contained in:
+10
-2
@@ -938,8 +938,16 @@ gcal_month_view_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
j = icaltime_days_in_month (priv->date->month, priv->date->year);
|
j = icaltime_days_in_month (priv->date->month, priv->date->year);
|
||||||
date = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget));
|
date = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget));
|
||||||
if (date->month == priv->date->month)
|
if (gcal_event_widget_get_all_day (GCAL_EVENT_WIDGET (child_widget)))
|
||||||
j = date->day;
|
{
|
||||||
|
if (date->month == priv->date->month)
|
||||||
|
j = date->day - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (date->month == priv->date->month)
|
||||||
|
j = date->day;
|
||||||
|
}
|
||||||
j += priv->days_delay;
|
j += priv->days_delay;
|
||||||
last_cell = 7 * ((j - 1) / 7)+ 6 * priv->k + sw * ((j - 1) % 7);
|
last_cell = 7 * ((j - 1) / 7)+ 6 * priv->k + sw * ((j - 1) % 7);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user