ui cleanup

This commit is contained in:
neon443
2025-06-14 18:53:34 +01:00
parent 22af9fc060
commit a40d4f4300
5 changed files with 38 additions and 39 deletions

View File

@@ -26,42 +26,44 @@ struct SymbolsPicker: View {
}
var body: some View {
GeometryReader { geo in
ScrollView {
if symbols.isEmpty {
HStack {
Image(systemName: "magnifyingglass")
.resizable().scaledToFit()
.frame(width: 30)
Text("You look lost")
.font(.title)
.bold()
}
.padding()
Text("The symbol picker search only works with exact matches, try a different search term.")
}
LazyVGrid(columns: gridLayout(forWidth: geo.size.width)) {
ForEach(symbols, id: \.self) { symbol in
Button() {
selection = symbol
} label: {
VStack {
Image(systemName: symbol)
.resizable()
.scaledToFit()
.symbolRenderingMode(.palette)
.foregroundStyle(.blue, .gray, .black)
Text(symbol)
.truncationMode(.middle)
.font(.footnote)
}
NavigationStack {
GeometryReader { geo in
ScrollView {
if symbols.isEmpty {
HStack {
Image(systemName: "magnifyingglass")
.resizable().scaledToFit()
.frame(width: 30)
Text("You look lost")
.font(.title)
.bold()
}
.padding()
Text("The symbol picker search only works with exact matches, try a different search term.")
}
LazyVGrid(columns: gridLayout(forWidth: geo.size.width)) {
ForEach(symbols, id: \.self) { symbol in
Button() {
selection = symbol
} label: {
VStack {
Image(systemName: symbol)
.resizable()
.scaledToFit()
.symbolRenderingMode(.palette)
.foregroundStyle(.blue, .gray, .black)
Text(symbol)
.truncationMode(.middle)
.font(.footnote)
}
}
.frame(maxWidth: 80, maxHeight: 80)
.buttonStyle(.plain)
}
.frame(maxWidth: 80, maxHeight: 80)
.buttonStyle(.plain)
}
}
.searchable(text: $searchInput)
}
.searchable(text: $searchInput)
}
}
}

View File

@@ -32,6 +32,7 @@ struct glassButton: ViewModifier {
} else {
content.buttonStyle(.borderedProminent)
.clipShape(RoundedRectangle(cornerRadius: 15))
.tint(.two)
}
}
}