commit 6bb977fcc28fce2718aa571882edb7d5fa84869b
parent 4ee38a5eab8d562e239cdb30d1939c17e61389d2
Author: Michael Camilleri <[email protected]>
Date: Sun, 7 Jun 2026 19:53:46 +0900
Use symbols rather than labels where possible
Diffstat:
6 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/Crossmate/Views/ClueList.swift b/Crossmate/Views/ClueList.swift
@@ -25,8 +25,13 @@ struct ClueList: View {
.navigationTitle("Clues")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
- ToolbarItem(placement: .topBarTrailing) {
- Button("Done") { dismiss() }
+ ToolbarItem(placement: .cancellationAction) {
+ Button {
+ dismiss()
+ } label: {
+ Image(systemName: "xmark")
+ }
+ .accessibilityLabel("Cancel")
}
}
}
diff --git a/Crossmate/Views/GameShareItem.swift b/Crossmate/Views/GameShareItem.swift
@@ -149,8 +149,13 @@ struct GameShareSheet: View {
.navigationTitle("Share Game")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
- ToolbarItem(placement: .confirmationAction) {
- Button("Done") { dismiss() }
+ ToolbarItem(placement: .cancellationAction) {
+ Button {
+ dismiss()
+ } label: {
+ Image(systemName: "xmark")
+ }
+ .accessibilityLabel("Cancel")
}
}
.task {
diff --git a/Crossmate/Views/NYTBrowseView.swift b/Crossmate/Views/NYTBrowseView.swift
@@ -340,18 +340,24 @@ struct NYTBrowseView: View {
private var dateWheelPopover: some View {
VStack(spacing: 28) {
HStack {
- Button("Cancel", role: .cancel) {
+ Button(role: .cancel) {
showingMonthPicker = false
+ } label: {
+ Image(systemName: "xmark")
}
+ .accessibilityLabel("Cancel")
Spacer()
- Button("Done") {
+ Button {
selectedDate = pickerDate
displayedMonth = startOfMonth(for: pickerDate)
showingMonthPicker = false
+ } label: {
+ Image(systemName: "checkmark")
}
.buttonStyle(.borderedProminent)
+ .accessibilityLabel("Done")
}
DatePicker(
diff --git a/Crossmate/Views/NYTLoginView.swift b/Crossmate/Views/NYTLoginView.swift
@@ -22,7 +22,12 @@ struct NYTLoginView: View {
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
- Button("Cancel") { dismiss() }
+ Button {
+ dismiss()
+ } label: {
+ Image(systemName: "xmark")
+ }
+ .accessibilityLabel("Cancel")
}
}
}
diff --git a/Crossmate/Views/NewGameSheet.swift b/Crossmate/Views/NewGameSheet.swift
@@ -55,7 +55,12 @@ struct NewGameSheet: View {
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
- Button("Cancel") { dismiss() }
+ Button {
+ dismiss()
+ } label: {
+ Image(systemName: "xmark")
+ }
+ .accessibilityLabel("Cancel")
}
}
}
diff --git a/Crossmate/Views/SettingsView.swift b/Crossmate/Views/SettingsView.swift
@@ -89,8 +89,13 @@ struct SettingsView: View {
.navigationTitle("Settings")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
- ToolbarItem(placement: .confirmationAction) {
- Button("Done") { dismiss() }
+ ToolbarItem(placement: .cancellationAction) {
+ Button {
+ dismiss()
+ } label: {
+ Image(systemName: "xmark")
+ }
+ .accessibilityLabel("Cancel")
}
}
.sheet(isPresented: $showingNYTLogin) {