summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index df74a744..1b90378a 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -144,8 +144,10 @@ static void visualOffsetAnimation_Widget_(void *ptr) {
144 iWidget *d = ptr; 144 iWidget *d = ptr;
145 postRefresh_App(); 145 postRefresh_App();
146 d->root->didAnimateVisualOffsets = iTrue; 146 d->root->didAnimateVisualOffsets = iTrue;
147// printf("'%s' visoffanim: fin:%d val:%f\n", cstr_String(&d->id),
148// isFinished_Anim(&d->visualOffset), value_Anim(&d->visualOffset)); fflush(stdout);
147 if (!isFinished_Anim(&d->visualOffset)) { 149 if (!isFinished_Anim(&d->visualOffset)) {
148 addTicker_App(visualOffsetAnimation_Widget_, ptr); 150 addTickerRoot_App(visualOffsetAnimation_Widget_, d->root, ptr);
149 } 151 }
150 else { 152 else {
151 d->flags &= ~visualOffset_WidgetFlag; 153 d->flags &= ~visualOffset_WidgetFlag;
@@ -919,6 +921,14 @@ int visualOffsetByReference_Widget(const iWidget *d) {
919// const float factor = width_Widget(d) / (float) size_Root(d->root).x; 921// const float factor = width_Widget(d) / (float) size_Root(d->root).x;
920 const int invOff = width_Widget(d) - iRound(value_Anim(&child->visualOffset)); 922 const int invOff = width_Widget(d) - iRound(value_Anim(&child->visualOffset));
921 offX -= invOff / 4; 923 offX -= invOff / 4;
924#if 0
925 if (invOff) {
926 printf(" [%p] %s (%p, fin:%d visoff:%d drag:%d): invOff %d\n", d, cstr_String(&child->id), child,
927 isFinished_Anim(&child->visualOffset),
928 (child->flags & visualOffset_WidgetFlag) != 0,
929 (child->flags & dragged_WidgetFlag) != 0, invOff); fflush(stdout);
930 }
931#endif
922 } 932 }
923 } 933 }
924 return offX; 934 return offX;