From 33d775ab823f4c01d819a29e7581dfe8453c7e9a Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Mon, 24 Jul 2023 23:21:15 +0100 Subject: [PATCH] rename to container size to match resolve method --- src/textual/css/scalar_animation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/textual/css/scalar_animation.py b/src/textual/css/scalar_animation.py index 15b6a3f089..e5e40df422 100644 --- a/src/textual/css/scalar_animation.py +++ b/src/textual/css/scalar_animation.py @@ -35,12 +35,12 @@ def __init__( self.easing = easing self.on_complete = on_complete - parent_size = widget.parent.size + container_size = widget.parent.size viewport = widget.app.size # Resolve scalar units to a start and destination size in cells - self.start = getattr(styles, attribute).resolve(parent_size, viewport) - self.destination = value.resolve(parent_size, viewport) + self.start = getattr(styles, attribute).resolve(container_size, viewport) + self.destination = value.resolve(container_size, viewport) if speed is not None: distance = self.start.get_distance_to(self.destination)