From 1f6c369c84e73616c6629604b557ee2299b81e6e Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 1 May 2024 10:43:29 +0100 Subject: [PATCH] no bankers rounding --- src/textual/widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/widget.py b/src/textual/widget.py index e1fa1346fc..33c143095c 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -2765,8 +2765,8 @@ def clamp_delta(delta: Offset) -> Offset: delta = clamp_delta( Offset( - round(region_center_x - window_center_x), - round(region_center_y - window_center_y), + int(region_center_x - window_center_x + 0.5), + int(region_center_y - window_center_y + 0.5), ) ) if origin_visible and (region.offset not in window.translate(delta)):