Skip to content

Commit 51d6543

Browse files
committed
ui: 완료 여부 ui를 상시 보여주도록 수정
1 parent ab20600 commit 51d6543

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

DevLog/UI/Common/Component/TodoItemRow.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99

1010
struct 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
}

0 commit comments

Comments
 (0)