mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 10:50:08 +00:00
calendar: Remove custom css background and border drawing
This commit is contained in:
parent
4d4b224a61
commit
55fc120134
@ -715,6 +715,9 @@ gtk_calendar_init (GtkCalendar *calendar)
|
|||||||
gtk_widget_set_can_focus (widget, TRUE);
|
gtk_widget_set_can_focus (widget, TRUE);
|
||||||
gtk_widget_set_has_window (widget, FALSE);
|
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])
|
if (!default_abbreviated_dayname[0])
|
||||||
for (i=0; i<7; i++)
|
for (i=0; i<7; i++)
|
||||||
{
|
{
|
||||||
@ -2731,23 +2734,8 @@ gtk_calendar_snapshot (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
GtkCalendar *calendar = GTK_CALENDAR (widget);
|
GtkCalendar *calendar = GTK_CALENDAR (widget);
|
||||||
GtkCalendarPrivate *priv = calendar->priv;
|
GtkCalendarPrivate *priv = calendar->priv;
|
||||||
GtkStyleContext *context;
|
|
||||||
int i;
|
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);
|
calendar_snapshot_main (calendar, snapshot);
|
||||||
|
|
||||||
if (priv->display_flags & GTK_CALENDAR_SHOW_HEADING)
|
if (priv->display_flags & GTK_CALENDAR_SHOW_HEADING)
|
||||||
|
Loading…
Reference in New Issue
Block a user