I can think at least 2 ways to approach this but there might be more.
Perfect world I would be able to
modify these absolute position values
at runtime depending on the desired
size of the “All” button. But it seems
like this is impossible?
It’s possible but not via widget animation per se. In order to pull it off you’d need to know the Desired Size of the widget and its relative location in the parent:
So placing the elements in a canvas (perfect for moving things around!) would the easiest since you have direct access to the (almost) pixel perfect data. Alternatively, you can animate render transforms - probably more fiddly overall, though.
Now, you cannot feed widget animation values dynamically, and widgets don’t have timelines (admittedly, you could have an actor send timeline progress to the widget). But you can have a fixed length widget animation (here 2.25s + Map Range to get Lerp friendly values) and Lerp between any value:
You know the size of the container (or calculate it from absolute → local, depending on how the menu hierarchy), you know the desired size of the widget to shift and you know where in the canvas it’s sitting - canvas slot position.
If the child is anchored to the left hand size, it’s a matter of moving it to the left by that much. Anchored to the centre, you’d need to adjust for half the widget width.
Another option is to use panel slots. When a widget is added to a panel (a Horizontal Box, lets say), the HB creates a slot for that child and the child must respect the rules of that parent slot.
Above, the 1,3,4 are set to size .1; setting them to size 0 would allow the second button to take all the space there is. You can animate Size but figuring out how much space these should take will be more difficult.