fix(ui): toggle expand on full folder row click
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Styling;
|
||||
using Avalonia.VisualTree;
|
||||
using ClaudeDo.Ui.ViewModels.Modals;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Modals;
|
||||
@@ -56,6 +57,16 @@ public partial class WorktreeModalView : Window
|
||||
RenderTransform = new ScaleTransform(1.0, 1.0);
|
||||
}
|
||||
|
||||
private void OnNodeTapped(object? sender, Avalonia.Input.TappedEventArgs e)
|
||||
{
|
||||
if (sender is not Control c) return;
|
||||
if (c.DataContext is not WorktreeNodeViewModel node) return;
|
||||
if (!node.IsDirectory) return;
|
||||
var tvi = c.FindAncestorOfType<TreeViewItem>();
|
||||
if (tvi is null) return;
|
||||
tvi.IsExpanded = !tvi.IsExpanded;
|
||||
}
|
||||
|
||||
private void OnTitleBarPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||
|
||||
Reference in New Issue
Block a user