views/week: Cleanup line rendering code

Remove copied style context calls, pass less arguments.
This commit is contained in:
Georges Basile Stavracas Neto
2025-03-19 19:23:58 -03:00
parent 60c2bd2138
commit f9ad1c2e7e
5 changed files with 13 additions and 40 deletions
+1 -13
View File
@@ -65,25 +65,13 @@ static void
gcal_week_hour_bar_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkStyleContext *context;
GtkWidget *child;
GdkRGBA color;
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
gtk_style_context_add_class (context, "lines");
gtk_style_context_get_color (context, &color);
gtk_style_context_restore (context);
gcal_week_view_common_snapshot_hour_lines (widget,
snapshot,
GTK_ORIENTATION_VERTICAL,
&color,
gtk_widget_get_width (widget),
gtk_widget_get_height (widget));
for (child = gtk_widget_get_first_child (widget);
for (GtkWidget *child = gtk_widget_get_first_child (widget);
child;
child = gtk_widget_get_next_sibling (child))
{