You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What: Widget.redraw(self) (and all subclasses) change to Widget.redraw(self, x, y). Widgets are now expected to store coordinates relative to their parents (instead of absolute screen coordinates). Parents pass their (absolute) coordinates as arguments to children' .redraw(x, y) methods. Children add these coordinate arguments to their own (relative) coordinates for drawing.
Why: Originally, picotui was intended to be as efficient and simple as possible. That's why coordinates were calculated just once and used as is. Any geometry management was considered out of scope of the library. While that remains true, there's a desire to make some simple/common scenarios easier. E.g., when screen is resized, a user may want to keep a dialog box centered on it. Currently, that requires going over all child widgets of a dialog and recalculating their (absolute) coordinates. While definitely possible, and how it was intended to be done originally, after additional experience and feedback, and I'd like to simplify that so only coordinates of the dialog itself need to be updated.
When: feedback is welcome whether this change should be dubbed 1.3 (or 1.4) or 2.0.
The text was updated successfully, but these errors were encountered:
What:
Widget.redraw(self)
(and all subclasses) change toWidget.redraw(self, x, y)
. Widgets are now expected to store coordinates relative to their parents (instead of absolute screen coordinates). Parents pass their (absolute) coordinates as arguments to children'.redraw(x, y)
methods. Children add these coordinate arguments to their own (relative) coordinates for drawing.Why: Originally, picotui was intended to be as efficient and simple as possible. That's why coordinates were calculated just once and used as is. Any geometry management was considered out of scope of the library. While that remains true, there's a desire to make some simple/common scenarios easier. E.g., when screen is resized, a user may want to keep a dialog box centered on it. Currently, that requires going over all child widgets of a dialog and recalculating their (absolute) coordinates. While definitely possible, and how it was intended to be done originally, after additional experience and feedback, and I'd like to simplify that so only coordinates of the dialog itself need to be updated.
When: feedback is welcome whether this change should be dubbed 1.3 (or 1.4) or 2.0.
The text was updated successfully, but these errors were encountered: