[gtk+/wip/baedert/drawing: 144/186] calendar: Remove custom css background and border drawing
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 144/186] calendar: Remove custom css background and border drawing
- Date: Tue, 16 May 2017 06:16:52 +0000 (UTC)
commit 6606cd877927af9bfdc2311baa17505038573df6
Author: Timm Bäder <mail baedert org>
Date: Sun May 7 14:26:10 2017 +0200
calendar: Remove custom css background and border drawing
gtk/gtkcalendar.c | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index ed5e209..5e85647 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++)
{
@@ -2738,23 +2741,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]