summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-05-07 14:26:10 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-07-19 21:27:12 -0400
commit55fc120134bb8d887bf867167a0ca05c1e6714c0 (patch)
tree65d9daf5688561d16925fe79575e93563c22b6a3 /gtk/gtkcalendar.c
parent4d4b224a61fa9f0d76b404ec34ba879b7cba392d (diff)
downloadgtk+-55fc120134bb8d887bf867167a0ca05c1e6714c0.tar.gz
calendar: Remove custom css background and border drawing
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 3ab3726206..7c0e733da4 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -715,6 +715,9 @@ gtk_calendar_init (GtkCalendar *calendar)
gtk_widget_set_can_focus (widget, TRUE);
gtk_widget_set_has_window (widget, FALSE);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (calendar)),
+ GTK_STYLE_CLASS_VIEW);
+
if (!default_abbreviated_dayname[0])
for (i=0; i<7; i++)
{
@@ -2731,23 +2734,8 @@ gtk_calendar_snapshot (GtkWidget *widget,
{
GtkCalendar *calendar = GTK_CALENDAR (widget);
GtkCalendarPrivate *priv = calendar->priv;
- GtkStyleContext *context;
int i;
- context = gtk_widget_get_style_context (widget);
-
- gtk_style_context_save (context);
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
-
- gtk_snapshot_render_background (snapshot, context, 0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget));
- gtk_snapshot_render_frame (snapshot, context, 0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget));
-
- gtk_style_context_restore (context);
-
calendar_snapshot_main (calendar, snapshot);
if (priv->display_flags & GTK_CALENDAR_SHOW_HEADING)