summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-22 08:19:00 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-22 08:19:00 +0300
commit4108d5b0154775e2bf2c3af5003cf840675d789a (patch)
tree07fb196da207d01e374ffb212748b904418561d1 /src/ui/widget.c
parent55168d6431d070353d6c6d127fa9702af6442c1f (diff)
DocumentWidget: Working on footer button positioning
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 5502cb8e..8d9c6f3b 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -59,6 +59,7 @@ void init_Widget(iWidget *d) {
59 d->minSize = zero_I2(); 59 d->minSize = zero_I2();
60 d->sizeRef = NULL; 60 d->sizeRef = NULL;
61 d->offsetRef = NULL; 61 d->offsetRef = NULL;
62 d->animOffsetRef = NULL;
62 d->bgColor = none_ColorId; 63 d->bgColor = none_ColorId;
63 d->frameColor = none_ColorId; 64 d->frameColor = none_ColorId;
64 init_Anim(&d->visualOffset, 0.0f); 65 init_Anim(&d->visualOffset, 0.0f);
@@ -769,6 +770,9 @@ static void applyVisualOffset_Widget_(const iWidget *d, iInt2 *pos) {
769 pos->y += off; 770 pos->y += off;
770 } 771 }
771 } 772 }
773 if (d->animOffsetRef) {
774 pos->y -= value_Anim(d->animOffsetRef);
775 }
772 if (d->flags & refChildrenOffset_WidgetFlag) { 776 if (d->flags & refChildrenOffset_WidgetFlag) {
773 iConstForEach(ObjectList, i, children_Widget(d->offsetRef)) { 777 iConstForEach(ObjectList, i, children_Widget(d->offsetRef)) {
774 const iWidget *child = i.object; 778 const iWidget *child = i.object;