File tree Expand file tree Collapse file tree
DevLog/UI/Common/Component Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import SwiftUI
99
1010struct TodoItemRow : View {
11+ @Environment ( \. sceneWidth) private var sceneWidth
1112 private let item : TodoListItem
1213
1314 init ( _ item: TodoListItem ) {
@@ -16,18 +17,17 @@ struct TodoItemRow: View {
1617
1718 var body : some View {
1819 HStack {
20+ Image ( systemName: " checkmark.circle " )
21+ . resizable ( )
22+ . frame ( width: sceneWidth * 0.08 , height: sceneWidth * 0.08 )
23+ . foregroundStyle ( item. isCompleted ? . green : . secondary)
1924 VStack ( alignment: . leading, spacing: 5 ) {
2025 HStack {
2126 if item. isPinned {
2227 Image ( systemName: " star.fill " )
2328 . font ( . headline)
2429 . foregroundStyle ( . orange)
2530 }
26- if item. isCompleted {
27- Image ( systemName: " checkmark.circle.fill " )
28- . font ( . headline)
29- . foregroundStyle ( . green)
30- }
3131 Text ( item. title)
3232 . font ( . headline)
3333 . foregroundStyle ( Color ( . label) )
@@ -49,6 +49,6 @@ struct TodoItemRow: View {
4949 . font ( . caption2. bold ( ) )
5050 . foregroundStyle ( . gray)
5151 }
52- . padding ( . vertical, 8 )
52+ . padding ( . vertical, 12 )
5353 }
5454}
You can’t perform that action at this time.
0 commit comments