refactor: replace checkbox toggles with segmented control

This commit is contained in:
Owen Gretzinger
2025-07-10 21:50:55 -04:00
parent 59a326e6c3
commit f1e9a79343
+5 -13
View File
@@ -70,22 +70,14 @@ struct MeetingDetailView: View {
// Controls Section
HStack {
// Left: Tab Toggles
HStack(spacing: 20) {
// Replace checkbox-style toggles with a native segmented control for a cleaner look
Picker("", selection: $viewModel.selectedTab) {
ForEach(MeetingViewTab.allCases, id: \.self) { tab in
Button(action: {
viewModel.selectedTab = tab
}) {
HStack(spacing: 6) {
Image(systemName: viewModel.selectedTab == tab ? "checkmark.circle.fill" : "circle")
.foregroundColor(viewModel.selectedTab == tab ? .accentColor : .secondary)
Text(tab.rawValue)
.foregroundColor(viewModel.selectedTab == tab ? .primary : .secondary)
}
}
.buttonStyle(.plain)
Text(tab.rawValue).tag(tab)
}
}
.pickerStyle(.segmented)
.frame(maxWidth: 260) // keep it compact so the recording controls have space
Spacer()