From 26ccd70e773785e39c08bc1ef1cf379a5002a927 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 18 Oct 2022 12:58:47 -0700 Subject: [PATCH] Scroll horizontal flex lists by whichever scroll delta dimension is greater --- crates/gpui/src/elements/flex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/elements/flex.rs b/crates/gpui/src/elements/flex.rs index fd37b001fe..1f1941a3d0 100644 --- a/crates/gpui/src/elements/flex.rs +++ b/crates/gpui/src/elements/flex.rs @@ -259,7 +259,7 @@ impl Element for Flex { if remaining_space < 0. { let mut delta = match axis { Axis::Horizontal => { - if e.delta.x() != 0. { + if e.delta.x().abs() >= e.delta.y().abs() { e.delta.x() } else { e.delta.y()