| 11 |
11 |
|
use super::theme;
|
| 12 |
12 |
|
use super::widgets;
|
| 13 |
13 |
|
|
| 14 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
14 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 15 |
15 |
|
use super::file_list_menus::start_os_drag;
|
| 16 |
16 |
|
|
| 17 |
17 |
|
/// Draw the sortable, multi-column file list.
|
| 24 |
24 |
|
// mouse-up so egui's pointer state is stale (`resp.dragged()` stays true).
|
| 25 |
25 |
|
// Block new OS drags until egui sees the pointer released or a 2s safety
|
| 26 |
26 |
|
// timeout expires.
|
| 27 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
27 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 28 |
28 |
|
let os_drag_blocked = if let Some(t) = state.os_drag_cooldown {
|
| 29 |
29 |
|
let pointer_up = !ui.input(|i| i.pointer.button_down(egui::PointerButton::Primary));
|
| 30 |
30 |
|
if pointer_up || t.elapsed() > std::time::Duration::from_secs(2) {
|
| 326 |
326 |
|
|
| 327 |
327 |
|
// Name (with inline icon)
|
| 328 |
328 |
|
row.col(|ui| {
|
| 329 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
329 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 330 |
330 |
|
let drag_blocked = os_drag_blocked;
|
| 331 |
|
- |
#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "linux")))]
|
|
331 |
+ |
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
|
| 332 |
332 |
|
let drag_blocked = false;
|
| 333 |
333 |
|
draw_name_column(ui, state, node, row_idx, selected, drag_blocked, sync_manager);
|
| 334 |
334 |
|
});
|
| 468 |
468 |
|
// While the post-drag cooldown is active, surface the wait state in the
|
| 469 |
469 |
|
// hover text — an invisible 2-second lockout otherwise reads as the app
|
| 470 |
470 |
|
// having silently stopped responding.
|
| 471 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
471 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 472 |
472 |
|
let resp = if !node.cloud_only && node.node.node_type == NodeType::Sample {
|
| 473 |
473 |
|
let hover = if os_drag_blocked {
|
| 474 |
474 |
|
"Just dragged — ready again in a moment."
|
| 514 |
514 |
|
}
|
| 515 |
515 |
|
|
| 516 |
516 |
|
// Native OS drag-out to Finder/DAW (only when instrument panel is closed)
|
| 517 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
517 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 518 |
518 |
|
if !os_drag_blocked
|
| 519 |
519 |
|
&& !state.instrument_visible
|
| 520 |
520 |
|
&& node.node.node_type == NodeType::Sample
|
| 530 |
530 |
|
// Trace when the post-drag cooldown swallows a user's drag attempt. The
|
| 531 |
531 |
|
// hover-text change above is the user-visible signal; this log helps
|
| 532 |
532 |
|
// diagnose any lingering drag-pipeline bugs that hide behind the cooldown.
|
| 533 |
|
- |
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
|
533 |
+ |
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
| 534 |
534 |
|
if os_drag_blocked
|
| 535 |
535 |
|
&& node.node.node_type == NodeType::Sample
|
| 536 |
536 |
|
&& !node.cloud_only
|