big u/i restructures - still ugly

This commit is contained in:
Rory Hinnen
2026-09-13 11:37:58 -05:00
parent 1507f8b8c6
commit 2034dbab40
7 changed files with 65 additions and 65 deletions
@@ -5,7 +5,6 @@
import SwiftUI
@available(iOS 26.0, *)
struct RerollPickerView: View {
@EnvironmentObject var current: Roll
@Binding var mode: RerollMode
@@ -24,30 +23,18 @@ struct RerollPickerView: View {
)
HStack(spacing: 8) {
Text("Reroll")
HStack(spacing: 6) {
Picker("Reroll", selection: actionBinding) {
ForEach(RerollMode.allCases, id: \.self) { m in
let isSelected = mode == m
Button(action: { actionBinding.wrappedValue = m }) {
Text(m.label)
.fontWeight(isSelected ? .semibold : .regular)
.padding(.horizontal, 12)
.padding(.vertical, 6)
.foregroundColor(isSelected ? Color(UIColor.systemBackground) : .primary)
.background(isSelected ? Color.green : Color.gray)
.clipShape(Capsule())
.overlay(Capsule().stroke(Color.primary, lineWidth: 1))
.glassEffect()
}
Text(m.label).tag(m)
}
}
.pickerStyle(.segmented)
}
.padding(.horizontal)
}
}
#Preview {
if #available(iOS 26.0, *) {
RerollPickerView(mode: .constant(.none))
.environmentObject(Roll())
}
RerollPickerView(mode: .constant(.none))
.environmentObject(Roll())
}