GNOME Bugzilla – Bug 703905
environment: Add some convenience LayoutManager monkey-patching
Last modified: 2013-07-24 13:25:49 UTC
See patch.
Created attachment 248776 [details] [review] environment: Add some convenience LayoutManager monkey-patching Similar to our ClutterContainer monkey-patching, we can add some convenience to existing ClutterLayoutManagers: - hookup_style() to bind layoutManager properties to CSS properties - child_set() to set child properties
Created attachment 248777 [details] [review] appDisplay: Use hookup_style() to bind app-view-controls spacing With the monkey-patched ClutterBoxLayout, we no longer need this code to hook up the 'spacing' property to CSS.
Review of attachment 248776 [details] [review]: ::: js/ui/environment.js @@ +43,3 @@ +function _patchLayoutClass(layoutClass, styleProps) { + if (styleProps) + layoutClass.prototype.hookup_style = function(container) { Do you need to pass the container, considering that the layout manager has a reference to its actor?
(In reply to comment #3) > considering that the layout manager has a reference to its actor? Where?
Oh, hm, I thought a ClutterLayoutManager was a ClutterActorMeta.
Review of attachment 248776 [details] [review]: Not sure on the value of child_set, but OK.
Review of attachment 248777 [details] [review]: OK.
Attachment 248776 [details] pushed as 6fd3c0f - environment: Add some convenience LayoutManager monkey-patching Attachment 248777 [details] pushed as cb4e4bb - appDisplay: Use hookup_style() to bind app-view-controls spacing