mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-10 10:36:35 +00:00
fix: remove the pill's own capsule background
The toolbar item already draws its own bezel for the principal-placement slot; painting a `Color.secondary.opacity(0.08)` capsule on top gave the pill a doubly-framed look. Drop the pill's background + the padding that was only there to fit inside the capsule. The dot + label now sit directly on the toolbar's native surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,9 @@ struct ConnectionStatusPill: View {
|
|||||||
status.retry()
|
status.retry()
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
|
// No explicit background — the SwiftUI toolbar gives the item
|
||||||
|
// its own bezel, and painting a second capsule on top looked
|
||||||
|
// doubly-framed. Just the colored dot + label reads cleanly.
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Circle()
|
Circle()
|
||||||
.fill(color)
|
.fill(color)
|
||||||
@@ -32,9 +35,6 @@ struct ConnectionStatusPill: View {
|
|||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 6)
|
|
||||||
.padding(.vertical, 2)
|
|
||||||
.background(Color.secondary.opacity(0.08), in: Capsule())
|
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.help(tooltip)
|
.help(tooltip)
|
||||||
|
|||||||
Reference in New Issue
Block a user