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 {
|
var color: Color {
|
||||||
switch self {
|
switch self {
|
||||||
case .low: .green
|
case .low: .green
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ struct TodoEditorView: View {
|
|||||||
Section {
|
Section {
|
||||||
Picker("Priorität", selection: $priority) {
|
Picker("Priorität", selection: $priority) {
|
||||||
ForEach(Priority.allCases, id: \.self) { p in
|
ForEach(Priority.allCases, id: \.self) { p in
|
||||||
Label(p.label, systemImage: "circle.fill")
|
Text("\(p.emoji) \(p.label)")
|
||||||
.foregroundStyle(p.color)
|
|
||||||
.tag(p)
|
.tag(p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct TodoRowView: View {
|
|||||||
|
|
||||||
if let priority = item.priority {
|
if let priority = item.priority {
|
||||||
Image(systemName: "circle.fill")
|
Image(systemName: "circle.fill")
|
||||||
.font(.system(size: 8))
|
.font(.system(size: 10))
|
||||||
.foregroundStyle(priority.color)
|
.foregroundStyle(priority.color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user