aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-top-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r--calendar/gui/e-day-view-top-item.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 1703467840..c58f057903 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -34,7 +34,6 @@
#include <libecal/e-cal-time-util.h>
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-categories.h>
-#include "calendar-config.h"
#include "e-calendar-view.h"
#include "e-day-view-top-item.h"
@@ -174,16 +173,11 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
cairo_pattern_t *pat;
guint16 red, green, blue;
gdouble cc = 65535.0;
- gboolean gradient;
- gfloat alpha;
gdouble x0, y0, rect_height, rect_width, radius;
day_view = e_day_view_top_item_get_day_view (top_item);
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
- gradient = calendar_config_get_display_events_gradient ();
- alpha = calendar_config_get_display_events_alpha ();
-
/* If the event is currently being dragged, don't draw it. It will
be drawn in the special drag items. */
if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT
@@ -245,7 +239,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
- cairo_set_source_rgba (cr, 1, 1, 1, alpha);
+ cairo_set_source_rgba (cr, 1, 1, 1, 1.0);
cairo_fill_preserve (cr);
cairo_restore (cr);
@@ -280,18 +274,14 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
- if (gradient) {
- pat = cairo_pattern_create_linear (item_x - x + 5.5, item_y + 2.5 - y,
- item_x - x + 5, item_y - y + item_h + 7.5);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
- cairo_set_source (cr, pat);
- cairo_fill_preserve (cr);
- cairo_pattern_destroy (pat);
- } else {
- cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0.8);
- cairo_fill_preserve (cr);
- }
+ pat = cairo_pattern_create_linear (item_x - x + 5.5, item_y + 2.5 - y,
+ item_x - x + 5, item_y - y + item_h + 7.5);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ cairo_set_source (cr, pat);
+ cairo_fill_preserve (cr);
+ cairo_pattern_destroy (pat);
+
cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);