forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'worktree-agent-af378b956e9f7f917'

Browse files at this commit

24f6477b9036df322d3995757d814112602c012bAhmet Kaan GümüşParent: 3bb5d72fc7ccc2
crates/app/src/ui/stance.rsmodified+20 -0
@@ -1126,6 +1126,26 @@ pub(crate) fn render(
1126 .min_w(px(0.))1126 .min_w(px(0.))
1127 .flex()1127 .flex()
1128 .flex_col()1128 .flex_col()
1129+ // A file dropped from outside the window (gpui's
1130+ // `ExternalPaths`, Wayland's `text/uri-list`) lands here: the
1131+ // one room-wide surface under everything else drawn below,
1132+ // so a drop anywhere in the darkroom is heard. No prior
1133+ // press starts this -- the drop itself arrives as a
1134+ // `MouseUp` (`window.rs`) -- and the tint is the same
1135+ // raised fill every other drop target in the darkroom
1136+ // answers a drag with, DESIGN §8's affordance without a
1137+ // word of copy on it.
1138+ .drag_over::<gpui::ExternalPaths>(|d, _, _, _| d.bg(rgb(DARK_RAISED())))
1139+ .on_drop(cx.listener(|this, paths: &gpui::ExternalPaths, _, cx| {
1140+ // `Player::import` is the one door a project or media
1141+ // path already goes through (argv, the Import button,
1142+ // Paste path) -- it forks on `.edith` vs everything else
1143+ // itself (`arrival`) and already refuses during an
1144+ // export, so a drop names nothing this loop has to.
1145+ for path in paths.paths() {
1146+ this.import(path, cx);
1147+ }
1148+ }))
1129 .child(screen(player, position, window, cx))1149 .child(screen(player, position, window, cx))
1130 .child(time_band(player, position, cx))1150 .child(time_band(player, position, cx))
1131 .child(divider(Split::Bench, cx))1151 .child(divider(Split::Bench, cx))