← All repositories

listless

A simple list app for Apple platforms

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


commit e542c7f27df71ce7393f12739caf6f5b050a7563
parent c0ba27a6c84495a6e940226aa7e391c0b4d1418b
Author: Michael Camilleri <[email protected]>
Date:   Mon, 23 Mar 2026 14:29:22 +0900

Tweak stroke on selected items

Prior to this commit, selected items got a border that used the
`.stroke` modifier. This puts the border on the 'outside' of the row.
This in turn slightly changes the position of the row. The
`.strokeBorder` modifier instead draws an inner stroke which is what
this commit switches to instead.

Co-Authored-By: Claude 4.6 Opus <[email protected]>

Diffstat

MListlessMac/Views/TaskListView.swift | 2+-
MListlessMac/Views/TaskRowView.swift | 2+-
MListlessiOS/Helpers/TaskCardModifier.swift | 2+-
MListlessiOS/Views/TaskRowView.swift | 2+-

4 files changed, 4 insertions(+), 4 deletions(-)

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

@@ -333,7 +333,7 @@ struct TaskListView: View, TaskListViewProtocol {
                     .overlay {
                         if isSelected {
                             RoundedRectangle(cornerRadius: 6, style: .continuous)
-                                .stroke(accentColor.opacity(0.40), lineWidth: 2)
+                                .strokeBorder(accentColor.opacity(0.40), lineWidth: 2)
                         }
                     }
                     .accessibilityIdentifier("draft-row-append")

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

@@ -134,7 +134,7 @@ struct TaskRowView: View {
         .overlay {
             if isSelected && !task.isCompleted {
                 RoundedRectangle(cornerRadius: 6, style: .continuous)
-                    .stroke(cachedAccentColor.opacity(0.40), lineWidth: 2)
+                    .strokeBorder(cachedAccentColor.opacity(0.40), lineWidth: 2)
             }
         }
         .contextMenu {

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

@@ -21,7 +21,7 @@ struct TaskCardModifier: ViewModifier {
             .overlay(
                 isSelected
                     ? Self.shape
-                        .stroke(accentColor.opacity(0.40), lineWidth: 2)
+                        .strokeBorder(accentColor.opacity(0.40), lineWidth: 2)
                     : nil
             )
     }

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

@@ -175,7 +175,7 @@ struct TaskRowView: View {
         .overlay(
             isSelected && !task.isCompleted
                 ? TaskCardModifier.shape
-                    .stroke(cachedAccentColor.opacity(0.40), lineWidth: 2)
+                    .strokeBorder(cachedAccentColor.opacity(0.40), lineWidth: 2)
                 : nil
         )
     }