← All repositories

listless

A simple list app for Apple platforms

git clone https://code.inqk.net/listless.git


commit 8639aac45f63910613008ad974f1440f542fdbd6
parent a54293a3c28d3d488f254d6baae1f4eb59b8af2c
Author: Michael Camilleri <[email protected]>
Date:   Fri,  6 Mar 2026 15:28:31 +0900

Fix background colour bug for completed tasks on macOS

Diffstat

MListlessMac/Views/TaskRowView.swift | 12+++++++-----

1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ListlessMac/Views/TaskRowView.swift b/ListlessMac/Views/TaskRowView.swift

@@ -183,11 +183,13 @@ struct TaskRowView: View {
 
     @ViewBuilder
     private var selectionBackground: some View {
-        if task.isCompleted {
-            isSelected ? Color(nsColor: .controlBackgroundColor) : Color(nsColor: .windowBackgroundColor)
-        } else if isSelected {
-            RoundedRectangle(cornerRadius: 6, style: .continuous)
-                .fill(Color(nsColor: .controlBackgroundColor))
+        if isSelected {
+            if task.isCompleted {
+                Color(nsColor: .controlBackgroundColor)
+            } else {
+                RoundedRectangle(cornerRadius: 6, style: .continuous)
+                    .fill(Color(nsColor: .controlBackgroundColor))
+            }
         }
     }