From db4e30dc6d9a66b6bb53f5179c16126a1d5f6906 Mon Sep 17 00:00:00 2001 From: jess Date: Sun, 10 May 2026 13:26:21 -0700 Subject: [PATCH] drag for resize hbs --- viewport/src/editor/free_layer.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/viewport/src/editor/free_layer.rs b/viewport/src/editor/free_layer.rs index 1a03679..873f365 100644 --- a/viewport/src/editor/free_layer.rs +++ b/viewport/src/editor/free_layer.rs @@ -1,3 +1,4 @@ +use iced_wgpu::core::mouse; use iced_wgpu::core::{alignment, Background, Border, Element, Length, Padding, Shadow, Theme}; use iced_widget::{container, MouseArea}; @@ -284,7 +285,14 @@ impl super::EditorState { ) .width(zone_w) .height(zone_h); + let cursor = match (horiz, vert) { + (true, true) => mouse::Interaction::ResizingDiagonallyDown, + (true, false) => mouse::Interaction::ResizingHorizontally, + (false, true) => mouse::Interaction::ResizingVertically, + (false, false) => mouse::Interaction::Idle, + }; let area = MouseArea::new(zone) + .interaction(cursor) .on_press(Message::ResizePress { node_id, horiz, vert }) .on_release(Message::ResizeRelease); iced_widget::container(area)