mirror of
https://github.com/yattee/yattee.git
synced 2025-12-07 08:38:14 +00:00
Add macOS 26 compatibility for search UI
Removed border overlay on search text field for macOS 26+ to match new design guidelines. Added conditional padding to sort label for better alignment on macOS 26+.
This commit is contained in:
@@ -93,9 +93,16 @@ struct SearchTextField: View {
|
|||||||
.fill(Color.background)
|
.fill(Color.background)
|
||||||
.frame(height: 27)
|
.frame(height: 27)
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: 5, style: .continuous)
|
Group {
|
||||||
.stroke(Color.gray.opacity(0.4), lineWidth: 1)
|
if #available(macOS 26, *) {
|
||||||
.frame(height: 27)
|
// No border for macOS 26+
|
||||||
|
EmptyView()
|
||||||
|
} else {
|
||||||
|
RoundedRectangle(cornerRadius: 5, style: .continuous)
|
||||||
|
.stroke(Color.gray.opacity(0.4), lineWidth: 1)
|
||||||
|
.frame(height: 27)
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,13 @@ struct SearchView: View {
|
|||||||
HStack {
|
HStack {
|
||||||
Text("Sort:")
|
Text("Sort:")
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
|
.padding(.leading, {
|
||||||
|
if #available(macOS 26, *) {
|
||||||
|
return 12
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}())
|
||||||
searchSortOrderPicker
|
searchSortOrderPicker
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user