aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-09 03:16:33 +0800
committerMilan Crha <mcrha@redhat.com>2009-07-09 03:16:33 +0800
commitd11c3c7df839d8bed10c67621fd64613c0b1eb34 (patch)
tree64914b0b6bc1bd0cc843cab2ee94051fb3d0661a /calendar/gui/e-day-view-main-item.c
parent1f41451e668dd3c551c215656071499dde0ed41a (diff)
downloadgsoc2013-evolution-d11c3c7df839d8bed10c67621fd64613c0b1eb34.tar.gz
gsoc2013-evolution-d11c3c7df839d8bed10c67621fd64613c0b1eb34.tar.zst
gsoc2013-evolution-d11c3c7df839d8bed10c67621fd64613c0b1eb34.zip
Bug #238058 - Show more from summary for events with icons
- do not show icons when editing event summary inline and the text is above them - move text right to icons as before when the text is on the same line as icons are
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index faed90a795..f8b264f762 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -624,12 +624,12 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_font_options_t *font_options;
guint16 red, green, blue;
gint i;
- gdouble radius, x0, y0, rect_height, rect_width;
+ gdouble radius, x0, y0, rect_height, rect_width, text_x_offset = 0.0;
gfloat alpha;
gboolean gradient;
gdouble cc = 65535.0;
gdouble date_fraction;
- gboolean short_event = FALSE, resize_flag = FALSE;
+ gboolean short_event = FALSE, resize_flag = FALSE, is_editing;
const gchar *end_resize_suffix;
gchar *end_regsizeime;
gint start_hour, start_display_hour, start_minute, start_suffix_width;
@@ -705,10 +705,13 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
}
}
+ is_editing = day_view->editing_event_day == day && day_view->editing_event_num == event_num;
+
+ if (event->canvas_item)
+ g_object_get (G_OBJECT (event->canvas_item), "x_offset", &text_x_offset, NULL);
+
/* Draw shadow around the event when selected */
- if (day_view->editing_event_day == day
- && day_view->editing_event_num == event_num && (GTK_WIDGET_HAS_FOCUS (day_view->main_canvas)))
- {
+ if (is_editing && (GTK_WIDGET_HAS_FOCUS (day_view->main_canvas))) {
/* For embossing Item selection */
item_x -= 1;
item_y -= 2;
@@ -903,8 +906,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
else
short_event = FALSE;
- if (day_view->editing_event_day == day
- && day_view->editing_event_num == event_num)
+ if (is_editing)
short_event = TRUE;
if (gradient) {
@@ -1045,7 +1047,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
/* Draw the reminder & recurrence icons, if needed. */
- if (!resize_flag) {
+ if (!resize_flag && (!is_editing || text_x_offset > E_DAY_VIEW_ICON_X_PAD)) {
num_icons = 0;
draw_reminder_icon = FALSE;
draw_recurrence_icon = FALSE;