fix: use emoji circles in priority picker for visible colors in menu style
This commit is contained in:
@@ -13,6 +13,14 @@ enum Priority: Int, CaseIterable, Codable {
|
||||
}
|
||||
}
|
||||
|
||||
var emoji: String {
|
||||
switch self {
|
||||
case .low: "🟢"
|
||||
case .medium: "🟡"
|
||||
case .high: "🔴"
|
||||
}
|
||||
}
|
||||
|
||||
var color: Color {
|
||||
switch self {
|
||||
case .low: .green
|
||||
|
||||
@@ -57,8 +57,7 @@ struct TodoEditorView: View {
|
||||
Section {
|
||||
Picker("Priorität", selection: $priority) {
|
||||
ForEach(Priority.allCases, id: \.self) { p in
|
||||
Label(p.label, systemImage: "circle.fill")
|
||||
.foregroundStyle(p.color)
|
||||
Text("\(p.emoji) \(p.label)")
|
||||
.tag(p)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ struct TodoRowView: View {
|
||||
|
||||
if let priority = item.priority {
|
||||
Image(systemName: "circle.fill")
|
||||
.font(.system(size: 8))
|
||||
.font(.system(size: 10))
|
||||
.foregroundStyle(priority.color)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user