@@ -90,9 +90,7 @@ public class DateTime.ComponentRow : Gtk.ListBoxRow {
9090 component_image = new Gtk .Image .from_icon_name (icon_name) {
9191 valign = Gtk . Align . START
9292 };
93-
94- unowned var component_image_context = component_image. get_style_context ();
95- component_image_context. add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
93+ component_image. get_style_context (). add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
9694
9795 name_label = new Gtk .Label (component. get_summary ()) {
9896 hexpand = true ,
@@ -103,16 +101,14 @@ public class DateTime.ComponentRow : Gtk.ListBoxRow {
103101 wrap_mode = Pango . WrapMode . WORD_CHAR ,
104102 xalign = 0
105103 };
106-
107- var name_label_context = name_label. get_style_context ();
108- name_label_context. add_class (" title" );
109- name_label_context. add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
104+ name_label. add_css_class (" title" );
105+ name_label. get_style_context (). add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
110106
111107 time_label = new Gtk .Label (null ) {
112108 use_markup = true ,
113109 xalign = 0 ,
114110 };
115- time_label. get_style_context () . add_class ( Granite . STYLE_CLASS_DIM_LABEL );
111+ time_label. add_css_class ( Granite . CssClass . DIM );
116112
117113 grid = new Gtk .Grid () {
118114 column_spacing = 6 ,
@@ -127,9 +123,8 @@ public class DateTime.ComponentRow : Gtk.ListBoxRow {
127123 grid. attach (time_label, 1 , 1 );
128124 }
129125
130- unowned var grid_context = grid. get_style_context ();
131- grid_context. add_class (" event" );
132- grid_context. add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
126+ grid. add_css_class (" event" );
127+ grid. get_style_context (). add_provider (css_provider, Gtk . STYLE_PROVIDER_PRIORITY_APPLICATION );
133128
134129 child = grid;
135130
0 commit comments