← All repositories

listless

A simple list app for Apple platforms

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


commit b0609e95fa78263e6e2e1821cb72364774e68128
parent 6297e3d54356bbf3d84f6211d04dfbde07676969
Author: Michael Camilleri <[email protected]>
Date:   Wed,  4 Mar 2026 19:23:51 +0900

Tweak colours to emphasise selection in the iOS version

Diffstat

MListlessiOS/Helpers/AppColors.swift | 16+++++++++-------
MListlessiOS/Views/TaskRowView.swift | 8++------

2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/ListlessiOS/Helpers/AppColors.swift b/ListlessiOS/Helpers/AppColors.swift

@@ -9,9 +9,11 @@ extension Color {
             : UIColor(red: 0.922, green: 0.906, blue: 0.886, alpha: 1)  // #EBE7E2
     })
 
-    /// Card surface: white in light mode, elevated dark gray in dark mode.
+    /// Card surface: warm tint in light mode, elevated dark gray in dark mode.
     static let taskCard = Color(uiColor: UIColor { traits in
-        traits.userInterfaceStyle == .dark ? UIColor.secondarySystemBackground : .white
+        traits.userInterfaceStyle == .dark
+            ? UIColor.secondarySystemBackground
+            : UIColor(red: 0.99, green: 0.985, blue: 0.98, alpha: 1)
     })
 
     /// Selected background for completed rows.
@@ -22,16 +24,16 @@ extension Color {
     })
 
     /// Drop shadow for selected active cards in light mode.
-    static let selectionShadowLight = Color(uiColor: UIColor { traits in
+    static let selectionShadow = Color(uiColor: UIColor { traits in
         traits.userInterfaceStyle == .dark
             ? .clear
             : UIColor(white: 0.0, alpha: 0.25)
     })
 
-    /// Glow for selected active cards in dark mode.
-    static let selectionShadowDark = Color(uiColor: UIColor { traits in
+    /// Slightly tinted card surface for selected active cards.
+    static let taskCardSelected = Color(uiColor: UIColor { traits in
         traits.userInterfaceStyle == .dark
-            ? UIColor(red: 1.0, green: 0.95, blue: 0.5, alpha: 0.2)
-            : .clear
+            ? UIColor(white: 0.15, alpha: 1)
+            : .white
     })
 }

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

@@ -172,13 +172,9 @@ struct TaskRowView: View {
             )
         )
         .shadow(
-            color: isSelected && !task.isCompleted ? .selectionShadowLight : .clear,
+            color: isSelected && !task.isCompleted ? .selectionShadow : .clear,
             radius: 4, x: 0, y: 2
         )
-        .shadow(
-            color: isSelected && !task.isCompleted ? .selectionShadowDark : .clear,
-            radius: 10, x: 0, y: 0
-        )
     }
 
     @MainActor
@@ -192,7 +188,7 @@ struct TaskRowView: View {
         if task.isCompleted {
             isSelected ? Color.completedSelected : Color.clear
         } else {
-            Color.taskCard
+            isSelected ? Color.taskCardSelected : Color.taskCard
         }
     }
 }