File tree Expand file tree Collapse file tree 2 files changed +26
-11
lines changed
Expand file tree Collapse file tree 2 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ struct StatusBarView: View {
2222 @Environment ( \. controlActiveState)
2323 private var controlActive
2424
25+ @EnvironmentObject private var utilityAreaViewModel : UtilityAreaViewModel
26+
2527 static var height : CGFloat {
2628 if #available( macOS 26 , * ) {
2729 37.0
@@ -48,6 +50,18 @@ struct StatusBarView: View {
4850 /// The actual status bar
4951 var body : some View {
5052 HStack ( alignment: . center, spacing: 10 ) {
53+ ForEach ( utilityAreaViewModel. tabItems) { tab in
54+ Button {
55+ utilityAreaViewModel. selectedTab = tab
56+ } label: {
57+ Image ( systemName: tab. systemImage)
58+ . foregroundStyle ( Color (
59+ utilityAreaViewModel. selectedTab == tab ? . controlAccentColor : . secondaryLabelColor
60+ ) )
61+ }
62+ . buttonStyle ( . icon)
63+ . help ( tab. title)
64+ }
5165// StatusBarBreakpointButton()
5266// StatusBarDivider()
5367 Spacer ( )
Original file line number Diff line number Diff line change @@ -11,16 +11,17 @@ struct UtilityAreaView: View {
1111 @EnvironmentObject private var utilityAreaViewModel : UtilityAreaViewModel
1212
1313 var body : some View {
14- WorkspacePanelView (
15- viewModel: utilityAreaViewModel,
16- selectedTab: $utilityAreaViewModel. selectedTab,
17- tabItems: $utilityAreaViewModel. tabItems,
18- sidebarPosition: . side,
19- darkDivider: true ,
20- padSideItemVertically: true
21- )
22- . accessibilityElement ( children: . contain)
23- . accessibilityLabel ( " Utility Area " )
24- . accessibilityIdentifier ( " UtilityArea " )
14+ // WorkspacePanelView(
15+ // viewModel: utilityAreaViewModel,
16+ // selectedTab: $utilityAreaViewModel.selectedTab,
17+ // tabItems: $utilityAreaViewModel.tabItems,
18+ // sidebarPosition: .side,
19+ // darkDivider: true,
20+ // padSideItemVertically: true
21+ // )
22+ utilityAreaViewModel. selectedTab
23+ . accessibilityElement ( children: . contain)
24+ . accessibilityLabel ( " Utility Area " )
25+ . accessibilityIdentifier ( " UtilityArea " )
2526 }
2627}
You can’t perform that action at this time.
0 commit comments