diff --git a/src/stage/timeline/timeline-layout.cpp b/src/stage/timeline/timeline-layout.cpp index fd7d862cc..802f0b518 100644 --- a/src/stage/timeline/timeline-layout.cpp +++ b/src/stage/timeline/timeline-layout.cpp @@ -64,7 +64,21 @@ namespace timeline { lumiera::advice::Provision styleAdvice{"style(trackBody)"}; Gtk::WidgetPath path = anchorWidget.get_path(); - ////////////////////////////////////////////////////////////////////////////TICKET #1201 : add code here to build a virtual path and construct a StyleContext. See gtk_widget_path_append_for_widget() in gtkwidget.c, 16413 + // build a "virtual" CSS node to represent the track scope + GType scopeNode = Gtk::Box::get_type(); + int pos = path.path_append_type (scopeNode); + // override the generic node name with a custom widget type + gtk_widget_path_iter_set_object_name (path.gobj(), pos, "TrackScope"); + // deliberately we don't invoke path.iter_set_name(pos, "id") add an #ID + path.iter_add_class(pos, "timeline"); + // for reference, see gtk_widget_path_append_for_widget() in in gtkwidget.c, line 16413 + + // create a new style context and configure it according to the defined path + PStyleContext style = Gtk::StyleContext::create(); + style->set_path (path); + // publish as Advice "style(trackBody)" + styleAdvice.setAdvice (style); + INFO (stage, "Body-CSS: path=%s", util::cStr (path.to_string())); ////////////////////////TICKET #1201 : this yields "paned:dir-ltr.horizontal box:dir-ltr.vertical TrackScope.timeline" } } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 41975adfe..4c4f9bac2 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -21492,6 +21492,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ StyleContext::create() +

+ + +
+
+ + + + + + +

+  void set_path(const WidgetPath& path); +

+

+ +

+

+ +

+

+ As a consequence, the style will be regenerated to match the new given path. +

+ + +
+