From b4b53eb5f19a49fa2659b41e3c10d48bbbf73447 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Sat, 22 Jul 2023 21:48:45 -0700 Subject: [PATCH 1/6] Refactor resize handle code to be amenable to cascading resizes --- crates/workspace/src/pane_group.rs | 74 ++++++++++++++++++------------ 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index e60f6deb2f..8d95465388 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -780,6 +780,11 @@ mod element { let mut bounding_boxes = self.bounding_boxes.borrow_mut(); bounding_boxes.clear(); + let sizes = self + .children + .iter() + .map(|child| child.size()) + .collect::>(); let mut children_iter = self.children.iter_mut().enumerate().peekable(); while let Some((ix, child)) = children_iter.next() { let child_start = child_origin.clone(); @@ -792,8 +797,7 @@ mod element { Axis::Vertical => child_origin += vec2f(0.0, child.size().y()), } - if let Some(Some((next_ix, next_child))) = can_resize.then(|| children_iter.peek()) - { + if can_resize && children_iter.peek().is_some() { scene.push_stacking_context(None, None); let handle_origin = match self.axis { @@ -823,14 +827,7 @@ mod element { }); let axis = self.axis; - let child_size = child.size(); - let next_child_size = next_child.size(); let drag_bounds = visible_bounds.clone(); - let flexes = self.flexes.borrow(); - let current_flex = flexes[ix]; - let next_ix = *next_ix; - let next_flex = flexes[next_ix]; - drop(flexes); enum ResizeHandle {} let mut mouse_region = MouseRegion::new::( cx.view_id(), @@ -840,50 +837,69 @@ mod element { mouse_region = mouse_region .on_drag(MouseButton::Left, { let flexes = self.flexes.clone(); + let sizes = sizes.clone(); move |drag, workspace: &mut Workspace, cx| { let min_size = match axis { Axis::Horizontal => HORIZONTAL_MIN_SIZE, Axis::Vertical => VERTICAL_MIN_SIZE, }; // Don't allow resizing to less than the minimum size, if elements are already too small - if min_size - 1. > child_size.along(axis) - || min_size - 1. > next_child_size.along(axis) - { + if min_size - 1. > sizes[ix].along(axis) { return; } + let mut flexes = flexes.borrow_mut(); + let mut current_target_size = (drag.position - child_start).along(axis); - let proposed_current_pixel_change = - current_target_size - child_size.along(axis); + let mut proposed_current_pixel_change = + current_target_size - sizes[ix].along(axis); + + let flex_changes = |target_size, target_ix| { + let current_pixel_change = target_size - sizes[ix].along(axis); + let flex_change = + current_pixel_change / drag_bounds.length_along(axis); + let current_target_flex = flexes[target_ix] + flex_change; + let next_target_flex = flexes[target_ix + 1] - flex_change; + (current_target_flex, next_target_flex) + }; if proposed_current_pixel_change < 0. { current_target_size = f32::max(current_target_size, min_size); + let (current_target_flex, next_target_flex) = + flex_changes(current_target_size, ix); + + *flexes.get_mut(ix).unwrap() = current_target_flex; + *flexes.get_mut(ix + 1).unwrap() = next_target_flex; } else if proposed_current_pixel_change > 0. { - // TODO: cascade this change to other children if current item is at min size - let next_target_size = f32::max( - next_child_size.along(axis) - proposed_current_pixel_change, + let mut next_target_size = f32::max( + sizes[ix + 1].along(axis) - proposed_current_pixel_change, min_size, ); + current_target_size = f32::min( current_target_size, - child_size.along(axis) + next_child_size.along(axis) + sizes[ix].along(axis) + sizes[ix + 1].along(axis) - next_target_size, ); + + let (current_target_flex, next_target_flex) = + flex_changes(current_target_size, ix); + + // TODO: make this into a loop + *flexes.get_mut(ix).unwrap() = current_target_flex; + *flexes.get_mut(ix + 1).unwrap() = next_target_flex; + + // let mut ix_offset = 0; + + // while proposed_current_pixel_change > 0. + // && ix + 1 + ix_offset < flexes.len() + // { + + // } } - let current_pixel_change = - current_target_size - child_size.along(axis); - let flex_change = - current_pixel_change / drag_bounds.length_along(axis); - let current_target_flex = current_flex + flex_change; - let next_target_flex = next_flex - flex_change; - - let mut borrow = flexes.borrow_mut(); - *borrow.get_mut(ix).unwrap() = current_target_flex; - *borrow.get_mut(next_ix).unwrap() = next_target_flex; - workspace.schedule_serialize(cx); cx.notify(); } From 28ee05b3240bc27eb951187fcff00e727dbb7a18 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Sun, 23 Jul 2023 01:00:52 -0700 Subject: [PATCH 2/6] WIP: cascade split resizes --- crates/workspace/src/pane_group.rs | 176 ++++++++++++++++------------- 1 file changed, 98 insertions(+), 78 deletions(-) diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index 8d95465388..bed99d6cc4 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -587,14 +587,16 @@ mod element { use std::{cell::RefCell, ops::Range, rc::Rc}; use gpui::{ + elements::MouseEventHandler, geometry::{ rect::RectF, vector::{vec2f, Vector2F}, }, json::{self, ToJson}, platform::{CursorStyle, MouseButton}, - AnyElement, Axis, CursorRegion, Element, LayoutContext, MouseRegion, RectFExt, - SceneBuilder, SizeConstraint, Vector2FExt, ViewContext, + scene::MouseDrag, + AnyElement, Axis, CursorRegion, Element, EventContext, LayoutContext, MouseRegion, + RectFExt, SceneBuilder, SizeConstraint, Vector2FExt, ViewContext, }; use crate::{ @@ -682,6 +684,90 @@ mod element { *cross_axis_max = cross_axis_max.max(child_size.along(cross_axis)); } } + + fn handle_resize( + flexes: Rc>>, + axis: Axis, + ix: usize, + child_start: Vector2F, + drag_bounds: RectF, + ) -> impl Fn(MouseDrag, &mut Workspace, &mut EventContext) { + let size = move |ix, flexes: &[f32]| { + drag_bounds.length_along(axis) * (flexes[ix] / flexes.len() as f32) + }; + + move |drag, workspace: &mut Workspace, cx| { + let min_size = match axis { + Axis::Horizontal => HORIZONTAL_MIN_SIZE, + Axis::Vertical => VERTICAL_MIN_SIZE, + }; + let mut flexes = flexes.borrow_mut(); + + // Don't allow resizing to less than the minimum size, if elements are already too small + if min_size - 1. > size(ix, flexes.as_slice()) { + return; + } + + let mut current_target_size = (drag.position - child_start).along(axis); + + let mut proposed_current_pixel_change = + current_target_size - size(ix, flexes.as_slice()); + + let flex_changes = |pixel_dx, target_ix, flexes: &[f32]| { + let flex_change = pixel_dx / drag_bounds.length_along(axis); + let current_target_flex = flexes[target_ix] + flex_change; + let next_target_flex = flexes[target_ix + 1] - flex_change; + (current_target_flex, next_target_flex) + }; + + if proposed_current_pixel_change < 0. { + current_target_size = f32::max(current_target_size, min_size); + let current_pixel_change = current_target_size - size(ix, flexes.as_slice()); + + let (current_target_flex, next_target_flex) = + flex_changes(current_pixel_change, ix, flexes.as_slice()); + + flexes[ix] = current_target_flex; + flexes[ix + 1] = next_target_flex; + } else if proposed_current_pixel_change > 0. { + let mut ix_offset = 0; + while proposed_current_pixel_change > 0.01 && ix + 1 + ix_offset < flexes.len() + { + let next_target_size = f32::max( + size(ix + 1, flexes.as_slice()) - proposed_current_pixel_change, + min_size, + ); + + current_target_size = f32::min( + current_target_size, + size(ix, flexes.as_slice()) + size(ix + 1, flexes.as_slice()) + - next_target_size, + ); + + let current_pixel_change = + current_target_size - size(ix, flexes.as_slice()); + + let (current_target_flex, next_target_flex) = + flex_changes(current_pixel_change, ix, flexes.as_slice()); + + flexes[ix_offset + ix] = current_target_flex; + flexes[ix_offset + ix + 1] = next_target_flex; + + dbg!( + current_pixel_change, + proposed_current_pixel_change, + proposed_current_pixel_change - current_pixel_change + ); + proposed_current_pixel_change -= current_pixel_change; + ix_offset += 1; + } + dbg!("done"); + } + + workspace.schedule_serialize(cx); + cx.notify(); + } + } } impl Extend> for PaneAxisElement { @@ -780,11 +866,6 @@ mod element { let mut bounding_boxes = self.bounding_boxes.borrow_mut(); bounding_boxes.clear(); - let sizes = self - .children - .iter() - .map(|child| child.size()) - .collect::>(); let mut children_iter = self.children.iter_mut().enumerate().peekable(); while let Some((ix, child)) = children_iter.next() { let child_start = child_origin.clone(); @@ -826,8 +907,6 @@ mod element { style, }); - let axis = self.axis; - let drag_bounds = visible_bounds.clone(); enum ResizeHandle {} let mut mouse_region = MouseRegion::new::( cx.view_id(), @@ -835,75 +914,16 @@ mod element { handle_bounds, ); mouse_region = mouse_region - .on_drag(MouseButton::Left, { - let flexes = self.flexes.clone(); - let sizes = sizes.clone(); - move |drag, workspace: &mut Workspace, cx| { - let min_size = match axis { - Axis::Horizontal => HORIZONTAL_MIN_SIZE, - Axis::Vertical => VERTICAL_MIN_SIZE, - }; - // Don't allow resizing to less than the minimum size, if elements are already too small - if min_size - 1. > sizes[ix].along(axis) { - return; - } - - let mut flexes = flexes.borrow_mut(); - - let mut current_target_size = - (drag.position - child_start).along(axis); - - let mut proposed_current_pixel_change = - current_target_size - sizes[ix].along(axis); - - let flex_changes = |target_size, target_ix| { - let current_pixel_change = target_size - sizes[ix].along(axis); - let flex_change = - current_pixel_change / drag_bounds.length_along(axis); - let current_target_flex = flexes[target_ix] + flex_change; - let next_target_flex = flexes[target_ix + 1] - flex_change; - (current_target_flex, next_target_flex) - }; - - if proposed_current_pixel_change < 0. { - current_target_size = f32::max(current_target_size, min_size); - let (current_target_flex, next_target_flex) = - flex_changes(current_target_size, ix); - - *flexes.get_mut(ix).unwrap() = current_target_flex; - *flexes.get_mut(ix + 1).unwrap() = next_target_flex; - } else if proposed_current_pixel_change > 0. { - let mut next_target_size = f32::max( - sizes[ix + 1].along(axis) - proposed_current_pixel_change, - min_size, - ); - - current_target_size = f32::min( - current_target_size, - sizes[ix].along(axis) + sizes[ix + 1].along(axis) - - next_target_size, - ); - - let (current_target_flex, next_target_flex) = - flex_changes(current_target_size, ix); - - // TODO: make this into a loop - *flexes.get_mut(ix).unwrap() = current_target_flex; - *flexes.get_mut(ix + 1).unwrap() = next_target_flex; - - // let mut ix_offset = 0; - - // while proposed_current_pixel_change > 0. - // && ix + 1 + ix_offset < flexes.len() - // { - - // } - } - - workspace.schedule_serialize(cx); - cx.notify(); - } - }) + .on_drag( + MouseButton::Left, + Self::handle_resize( + self.flexes.clone(), + self.axis, + ix, + child_start, + visible_bounds.clone(), + ), + ) .on_click(MouseButton::Left, { let flexes = self.flexes.clone(); move |e, v: &mut Workspace, cx| { From 429a2fc623bb1b56f9d67b2d48f20fad629b04b2 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Sun, 23 Jul 2023 13:28:30 -0700 Subject: [PATCH 3/6] Add drag end events Fix left dragging cascade WIP: Implement right dragging, WIP: use drag end events to set and reset state around initial flex orientation --- crates/gpui/src/app/window.rs | 20 ++++++++++++++++ crates/gpui/src/scene/mouse_event.rs | 1 + crates/workspace/src/pane_group.rs | 34 +++++++++++++++------------- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/crates/gpui/src/app/window.rs b/crates/gpui/src/app/window.rs index 1dc88d2e71..e4beb58873 100644 --- a/crates/gpui/src/app/window.rs +++ b/crates/gpui/src/app/window.rs @@ -518,6 +518,18 @@ impl<'a> WindowContext<'a> { // NOTE: The order of event pushes is important! MouseUp events MUST be fired // before click events, and so the MouseUp events need to be pushed before // MouseClick events. + + // Synthesize one last drag event to end the drag + mouse_events.push(MouseEvent::Drag(MouseDrag { + region: Default::default(), + prev_mouse_position: self.window.mouse_position, + platform_event: MouseMovedEvent { + position: e.position, + pressed_button: Some(e.button), + modifiers: e.modifiers, + }, + end: true, + })); mouse_events.push(MouseEvent::Up(MouseUp { region: Default::default(), platform_event: e.clone(), @@ -565,8 +577,16 @@ impl<'a> WindowContext<'a> { region: Default::default(), prev_mouse_position: self.window.mouse_position, platform_event: e.clone(), + end: false, })); } else if let Some((_, clicked_button)) = self.window.clicked_region { + mouse_events.push(MouseEvent::Drag(MouseDrag { + region: Default::default(), + prev_mouse_position: self.window.mouse_position, + platform_event: e.clone(), + end: true, + })); + // Mouse up event happened outside the current window. Simulate mouse up button event let button_event = e.to_button_event(clicked_button); mouse_events.push(MouseEvent::Up(MouseUp { diff --git a/crates/gpui/src/scene/mouse_event.rs b/crates/gpui/src/scene/mouse_event.rs index a492da771b..21d3716aa6 100644 --- a/crates/gpui/src/scene/mouse_event.rs +++ b/crates/gpui/src/scene/mouse_event.rs @@ -32,6 +32,7 @@ pub struct MouseDrag { pub region: RectF, pub prev_mouse_position: Vector2F, pub platform_event: MouseMovedEvent, + pub end: bool } impl Deref for MouseDrag { diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index bed99d6cc4..05684229cc 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -587,7 +587,6 @@ mod element { use std::{cell::RefCell, ops::Range, rc::Rc}; use gpui::{ - elements::MouseEventHandler, geometry::{ rect::RectF, vector::{vec2f, Vector2F}, @@ -697,6 +696,10 @@ mod element { }; move |drag, workspace: &mut Workspace, cx| { + if drag.end { + dbg!("FINISHED"); + return; + } let min_size = match axis { Axis::Horizontal => HORIZONTAL_MIN_SIZE, Axis::Vertical => VERTICAL_MIN_SIZE, @@ -713,10 +716,10 @@ mod element { let mut proposed_current_pixel_change = current_target_size - size(ix, flexes.as_slice()); - let flex_changes = |pixel_dx, target_ix, flexes: &[f32]| { + let flex_changes = |pixel_dx, target_ix, next: isize, flexes: &[f32]| { let flex_change = pixel_dx / drag_bounds.length_along(axis); let current_target_flex = flexes[target_ix] + flex_change; - let next_target_flex = flexes[target_ix + 1] - flex_change; + let next_target_flex = flexes[(target_ix as isize + next) as usize] - flex_change; (current_target_flex, next_target_flex) }; @@ -725,7 +728,7 @@ mod element { let current_pixel_change = current_target_size - size(ix, flexes.as_slice()); let (current_target_flex, next_target_flex) = - flex_changes(current_pixel_change, ix, flexes.as_slice()); + flex_changes(current_pixel_change, ix, 1, flexes.as_slice()); flexes[ix] = current_target_flex; flexes[ix + 1] = next_target_flex; @@ -733,35 +736,31 @@ mod element { let mut ix_offset = 0; while proposed_current_pixel_change > 0.01 && ix + 1 + ix_offset < flexes.len() { + let current_ix = ix_offset + ix; let next_target_size = f32::max( - size(ix + 1, flexes.as_slice()) - proposed_current_pixel_change, + size(current_ix + 1, flexes.as_slice()) - proposed_current_pixel_change, min_size, ); current_target_size = f32::min( current_target_size, - size(ix, flexes.as_slice()) + size(ix + 1, flexes.as_slice()) + size(current_ix, flexes.as_slice()) + + size(current_ix + 1, flexes.as_slice()) - next_target_size, ); let current_pixel_change = - current_target_size - size(ix, flexes.as_slice()); + current_target_size - size(current_ix, flexes.as_slice()); let (current_target_flex, next_target_flex) = - flex_changes(current_pixel_change, ix, flexes.as_slice()); + flex_changes(current_pixel_change, current_ix, 1, flexes.as_slice()); - flexes[ix_offset + ix] = current_target_flex; - flexes[ix_offset + ix + 1] = next_target_flex; + flexes[current_ix] = current_target_flex; + flexes[current_ix + 1] = next_target_flex; - dbg!( - current_pixel_change, - proposed_current_pixel_change, - proposed_current_pixel_change - current_pixel_change - ); proposed_current_pixel_change -= current_pixel_change; ix_offset += 1; } - dbg!("done"); } workspace.schedule_serialize(cx); @@ -924,6 +923,9 @@ mod element { visible_bounds.clone(), ), ) + .on_down(MouseButton::Left, |_, _: &mut Workspace, _| { + dbg!("INITIATE"); + }) .on_click(MouseButton::Left, { let flexes = self.flexes.clone(); move |e, v: &mut Workspace, cx| { From 25e4bcea7f8154afdea7de62b66b4fd025bb6f5f Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 24 Jul 2023 08:04:46 -0700 Subject: [PATCH 4/6] Implement cascading resize algorithm --- crates/workspace/src/pane_group.rs | 94 ++++++++++++++++-------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index 05684229cc..22435b56f0 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -584,7 +584,7 @@ impl SplitDirection { } mod element { - use std::{cell::RefCell, ops::Range, rc::Rc}; + use std::{cell::RefCell, iter::from_fn, ops::Range, rc::Rc}; use gpui::{ geometry::{ @@ -687,7 +687,7 @@ mod element { fn handle_resize( flexes: Rc>>, axis: Axis, - ix: usize, + preceding_ix: usize, child_start: Vector2F, drag_bounds: RectF, ) -> impl Fn(MouseDrag, &mut Workspace, &mut EventContext) { @@ -697,7 +697,7 @@ mod element { move |drag, workspace: &mut Workspace, cx| { if drag.end { - dbg!("FINISHED"); + // Clear cascading resize state return; } let min_size = match axis { @@ -707,60 +707,66 @@ mod element { let mut flexes = flexes.borrow_mut(); // Don't allow resizing to less than the minimum size, if elements are already too small - if min_size - 1. > size(ix, flexes.as_slice()) { + if min_size - 1. > size(preceding_ix, flexes.as_slice()) { return; } - let mut current_target_size = (drag.position - child_start).along(axis); - - let mut proposed_current_pixel_change = - current_target_size - size(ix, flexes.as_slice()); + let mut proposed_current_pixel_change = (drag.position - child_start).along(axis) + - size(preceding_ix, flexes.as_slice()); let flex_changes = |pixel_dx, target_ix, next: isize, flexes: &[f32]| { let flex_change = pixel_dx / drag_bounds.length_along(axis); let current_target_flex = flexes[target_ix] + flex_change; - let next_target_flex = flexes[(target_ix as isize + next) as usize] - flex_change; + let next_target_flex = + flexes[(target_ix as isize + next) as usize] - flex_change; (current_target_flex, next_target_flex) }; - if proposed_current_pixel_change < 0. { - current_target_size = f32::max(current_target_size, min_size); - let current_pixel_change = current_target_size - size(ix, flexes.as_slice()); + let mut successors = from_fn({ + let forward = proposed_current_pixel_change > 0.; + let mut ix_offset = 0; + let len = flexes.len(); + move || { + let result = if forward { + (preceding_ix + 1 + ix_offset < len).then(|| preceding_ix + ix_offset) + } else { + (preceding_ix as isize - ix_offset as isize >= 0) + .then(|| preceding_ix - ix_offset) + }; + + ix_offset += 1; + + result + } + }); + + while proposed_current_pixel_change.abs() > 0. { + let Some(current_ix) = successors.next() else { + break; + }; + + let next_target_size = f32::max( + size(current_ix + 1, flexes.as_slice()) - proposed_current_pixel_change, + min_size, + ); + + let current_target_size = f32::max( + size(current_ix, flexes.as_slice()) + + size(current_ix + 1, flexes.as_slice()) + - next_target_size, + min_size, + ); + + let current_pixel_change = + current_target_size - size(current_ix, flexes.as_slice()); let (current_target_flex, next_target_flex) = - flex_changes(current_pixel_change, ix, 1, flexes.as_slice()); + flex_changes(current_pixel_change, current_ix, 1, flexes.as_slice()); - flexes[ix] = current_target_flex; - flexes[ix + 1] = next_target_flex; - } else if proposed_current_pixel_change > 0. { - let mut ix_offset = 0; - while proposed_current_pixel_change > 0.01 && ix + 1 + ix_offset < flexes.len() - { - let current_ix = ix_offset + ix; - let next_target_size = f32::max( - size(current_ix + 1, flexes.as_slice()) - proposed_current_pixel_change, - min_size, - ); + flexes[current_ix] = current_target_flex; + flexes[current_ix + 1] = next_target_flex; - current_target_size = f32::min( - current_target_size, - size(current_ix, flexes.as_slice()) - + size(current_ix + 1, flexes.as_slice()) - - next_target_size, - ); - - let current_pixel_change = - current_target_size - size(current_ix, flexes.as_slice()); - - let (current_target_flex, next_target_flex) = - flex_changes(current_pixel_change, current_ix, 1, flexes.as_slice()); - - flexes[current_ix] = current_target_flex; - flexes[current_ix + 1] = next_target_flex; - - proposed_current_pixel_change -= current_pixel_change; - ix_offset += 1; - } + proposed_current_pixel_change -= current_pixel_change; } workspace.schedule_serialize(cx); @@ -924,7 +930,7 @@ mod element { ), ) .on_down(MouseButton::Left, |_, _: &mut Workspace, _| { - dbg!("INITIATE"); + // Save cascading resize state }) .on_click(MouseButton::Left, { let flexes = self.flexes.clone(); From 56704c7c5f930a7840ebc00253fbda9da5476122 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 26 Jul 2023 09:37:52 -0700 Subject: [PATCH 5/6] Remove placeholders --- crates/workspace/src/pane_group.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index 22435b56f0..3d7032c148 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -697,7 +697,7 @@ mod element { move |drag, workspace: &mut Workspace, cx| { if drag.end { - // Clear cascading resize state + // TODO: Clear cascading resize state return; } let min_size = match axis { @@ -929,9 +929,6 @@ mod element { visible_bounds.clone(), ), ) - .on_down(MouseButton::Left, |_, _: &mut Workspace, _| { - // Save cascading resize state - }) .on_click(MouseButton::Left, { let flexes = self.flexes.clone(); move |e, v: &mut Workspace, cx| { From a58c9ed7d3b6ad8203b60e4520ddced8b3042f09 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 26 Jul 2023 09:39:35 -0700 Subject: [PATCH 6/6] fmt --- crates/gpui/src/scene/mouse_event.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/scene/mouse_event.rs b/crates/gpui/src/scene/mouse_event.rs index 21d3716aa6..89bf874583 100644 --- a/crates/gpui/src/scene/mouse_event.rs +++ b/crates/gpui/src/scene/mouse_event.rs @@ -32,7 +32,7 @@ pub struct MouseDrag { pub region: RectF, pub prev_mouse_position: Vector2F, pub platform_event: MouseMovedEvent, - pub end: bool + pub end: bool, } impl Deref for MouseDrag {