THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY. The following task has a new comment added:
FS#1296 - Updated signal causes total relayout User who did this - Uli Schlachter (psychon) ---------- Attached is a quick prototype implementation of this. It only depends on gears.object and lgi. A widget has this callbacks: - :fit(wibox, width, height): Returns width and height that the widget wants to have, is called to assign sizes, must not have any side effect - :layout(wibox, width, height): Is called when the widget should place its children, must call base.place_widget(wibox, widget, matrix, width, height) for each child. Can use base.fit_widget(wibox, widget, width, height). Matrix transforms from this widget's coordinate space into the children's space. - :draw(wibox, cr, width, height) (and before_draw_children, after_draw_children): This is called when the widget should be drawn. This should just draw this widget on the given cairo context and doesn't have to interact with children. The two *_draw_children() do what their name suggests and can be e.g. used to set the cairo context's foreground color. Signals: - widget::redraw_needed: The various draw methods have to be called again. Only widgets which cover the same space are redrawn. - widget::layout_changed: Well, yeah, the layout needs to be changed. TODO: This still needs some magic to cache sub-layouts. Just like :fit() is cached in base.fit_widget, :layout() should be cached in base.place_widget() and this cache should only be invalidated from the widget::layout_changed signal. New compared to what we have right now: Layouts don't need to connect to any signals of their child widget since the wibox code does that for them. (The wibox code has to do this since it needs to figure out which area to redraw and I want to keep the widget hierachy private. But I bet someone will want to export it...) ---------- One or more files have been attached. More information can be found at the following URL: https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1296#comment4154 You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above. -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.