diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-16 13:19:26 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-10-17 20:38:16 +0200 |
commit | 49623838743ad69811dd8348c57ca0baed46934c (patch) | |
tree | 25f38db754a740e0880e6c7c1cc455e618033e03 /dw/widget.hh | |
parent | b6c8599a5acdaddccca102bae4370316beaa1915 (diff) |
Allow widgets to adjust new requisition
When a widget calls the parent to correct its own requisition, let the
child widget perform adjustments on the requisition. This allows images
to control the height when the parent changes the width, so the image
can preserve its own aspect ratio.
Diffstat (limited to 'dw/widget.hh')
-rw-r--r-- | dw/widget.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dw/widget.hh b/dw/widget.hh index 1787be1f..a7daa91d 100644 --- a/dw/widget.hh +++ b/dw/widget.hh @@ -351,6 +351,7 @@ protected: virtual int getAvailWidthOfChild (Widget *child, bool forceValue); virtual int getAvailHeightOfChild (Widget *child, bool forceValue); + virtual void setReqWidth (Requisition *requisition, int width); virtual void correctRequisitionOfChild (Widget *child, Requisition *requisition, void (*splitHeightFun) (int, int*, |