refactor: replace checkbox toggles with segmented control
This commit is contained in:
@@ -70,22 +70,14 @@ struct MeetingDetailView: View {
|
|||||||
// Controls Section
|
// Controls Section
|
||||||
HStack {
|
HStack {
|
||||||
// Left: Tab Toggles
|
// 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
|
ForEach(MeetingViewTab.allCases, id: \.self) { tab in
|
||||||
Button(action: {
|
Text(tab.rawValue).tag(tab)
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pickerStyle(.segmented)
|
||||||
|
.frame(maxWidth: 260) // keep it compact so the recording controls have space
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user