ui: the signal badge is the drag handle (to a plot row, or to reorder); the list rows stop dragging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f27925da59
commit
ca10dfb323
9 files changed
+230
-109
No files matched your search
+2
-21
@@ -4634,25 +4634,6 @@ void on_pane_edit_clicked(GtkButton* button, gpointer user) {
|
||||
apply_pane_lock(*app);
|
||||
}
|
||||
|
||||
/// Hides the sidebar for the length of a drag, when it is *overlaid*, and restores it after.
|
||||
///
|
||||
/// With the split view collapsed the sidebar covers the plot -- that is what collapsed means -- so a drag
|
||||
/// that starts in the signal list has nowhere to land: the pointer is over the sidebar and never over a
|
||||
/// drop target, and the drag is impossible rather than merely awkward. Side by side nothing is done: the
|
||||
/// plot is already visible, and hiding the list the drag started in would be startling.
|
||||
void row_drag_sidebar(App& app, bool dragging) {
|
||||
if (app.side_view == nullptr) return;
|
||||
AdwOverlaySplitView* split = ADW_OVERLAY_SPLIT_VIEW(app.side_view);
|
||||
if (dragging) {
|
||||
if (!adw_overlay_split_view_get_collapsed(split)) return;
|
||||
app.sidebar_hidden_for_drag = adw_overlay_split_view_get_show_sidebar(split) != FALSE;
|
||||
if (app.sidebar_hidden_for_drag) adw_overlay_split_view_set_show_sidebar(split, FALSE);
|
||||
} else if (app.sidebar_hidden_for_drag) {
|
||||
app.sidebar_hidden_for_drag = false;
|
||||
adw_overlay_split_view_set_show_sidebar(split, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void run_app_action(App& app, AppAction action) {
|
||||
const auto toggle = [](GtkWidget* button) {
|
||||
if (button == nullptr) return;
|
||||
@@ -6223,8 +6204,8 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit
|
||||
app.window_limit_s);
|
||||
{
|
||||
GtkIconTheme* theme = gtk_icon_theme_get_for_display(gdk_display_get_default());
|
||||
std::printf("[udpscope] pane drag: sidebar hidden for the drag=%d restored after it=%d\n",
|
||||
app.dbg_drag_hid_sidebar, app.dbg_drag_restored_sidebar);
|
||||
std::printf("[udpscope] pane drag: slide-over closed for the drag=%d\n",
|
||||
app.dbg_drag_closed_slideover);
|
||||
std::printf("[udpscope] pane edits: locked=%s(%s) config=%s(%s)\n",
|
||||
app.dbg_pane_edit_icon.c_str(),
|
||||
gtk_icon_theme_has_icon(theme, app.dbg_pane_edit_icon.c_str()) ? "ok" : "MISSING",
|
||||
|
||||
Reference in new issue
Block a user