From c44aefde77d8d1d52e9b823b799bc02ccc467735 Mon Sep 17 00:00:00 2001 From: Mika Kuns Date: Tue, 14 Apr 2026 10:36:06 +0200 Subject: [PATCH] style(ui): add strikethrough and dimming for completed tasks Co-Authored-By: Claude Sonnet 4.6 --- src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs | 14 ++++++++++++++ src/ClaudeDo.Ui/Views/TaskListView.axaml | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs b/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs index af7ad09..5dade3c 100644 --- a/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs @@ -1,3 +1,4 @@ +using Avalonia.Media; using ClaudeDo.Data.Models; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; @@ -43,6 +44,16 @@ public partial class TaskItemViewModel : ViewModelBase public bool IsRunning => Status == TaskStatus.Running; public bool CanToggleDone => Status != TaskStatus.Running && Status != TaskStatus.Failed; + public TextDecorationCollection? TitleDecorations => IsDone + ? TextDecorations.Strikethrough + : null; + + public IBrush TitleForeground => IsDone + ? new SolidColorBrush(Color.Parse("#5a6578")) + : new SolidColorBrush(Color.Parse("#e2e8f0")); + + public double RowOpacity => IsDone ? 0.6 : 1.0; + public void Refresh(TaskEntity entity, IReadOnlyList tags) { Entity = entity; @@ -56,6 +67,9 @@ public partial class TaskItemViewModel : ViewModelBase OnPropertyChanged(nameof(IsDone)); OnPropertyChanged(nameof(IsRunning)); OnPropertyChanged(nameof(CanToggleDone)); + OnPropertyChanged(nameof(TitleDecorations)); + OnPropertyChanged(nameof(TitleForeground)); + OnPropertyChanged(nameof(RowOpacity)); ToggleDoneCommand.NotifyCanExecuteChanged(); } diff --git a/src/ClaudeDo.Ui/Views/TaskListView.axaml b/src/ClaudeDo.Ui/Views/TaskListView.axaml index 81a5f55..95d788b 100644 --- a/src/ClaudeDo.Ui/Views/TaskListView.axaml +++ b/src/ClaudeDo.Ui/Views/TaskListView.axaml @@ -33,6 +33,7 @@ @@ -75,7 +76,8 @@