Repository: CodeEditApp/CodeEdit
File: CodeEdit/TabBar/TabBar.swift (Swift)

Code before:
    private var prefs: AppPreferencesModel = .shared

    var body: some View {
        HStack(alignment: .center, spacing: 0) {
            // Tab bar navigation control.
            // TODO: Real functionality of tab bar navigation control and their stated foreground color.
            HStack(spacing: 10) {
                Button(
                    action: { /* TODO */ },
                    label: {
                        Image(systemName: "chevron.left")
                    }
                )
                .foregroundColor(.secondary)
                .buttonStyle(.plain)
                Button(
                    action: { /* TODO */ },
                    label: {
                        Image(systemName: "chevron.right")
                    }
                )
                .foregroundColor(.secondary.opacity(0.5))
                .buttonStyle(.plain)
            }
            .padding(.horizontal, 11)
            .opacity(activeState != ControlActiveState.inactive ? 1.0 : 0.5)
            // Tab bar items.
            ScrollView(.horizontal, showsIndicators: false) {
                ScrollViewReader { value in
                    HStack(alignment: .center, spacing: -1) {
                        ForEach(workspace.selectionState.openFileItems, id: \.id) { item in
                            TabBarItem(
                                item: item,
                                windowController: windowController,
                                workspace: workspace
                            )
                        }
                    }
                    .onAppear {
                        value.scrollTo(self.workspace.selectionState.selectedId)
                    }
                }
            }
            // TODO: Tab bar tools (e.g. split view).
        }
        .frame(height: tabBarHeight)
        .overlay {
            // When tab bar style is `xcode`, we put the top divider as an overlay.
            if prefs.preferences.general.tabBarStyle == .xcode {
                TabBarTopDivider()
                    .frame(height: tabBarHeight, alignment: .top)

Review comment (suggestion):
just use `.inactive` since Swift implicitly gets the Type.

Code after:
    private var prefs: AppPreferencesModel = .shared

    var body: some View {
        HStack(alignment: .center, spacing: 0) {
            // Tab bar navigation control.
            // TODO: Real functionality of tab bar navigation control and their stated foreground color.
            HStack(spacing: 10) {
                Button(
                    action: { /* TODO */ },
                    label: {
                        Image(systemName: "chevron.left")
                    }
                )
                .foregroundColor(.secondary)
                .buttonStyle(.plain)
                Button(
                    action: { /* TODO */ },
                    label: {
                        Image(systemName: "chevron.right")
                    }
                )
                .foregroundColor(.secondary.opacity(0.5))
                .buttonStyle(.plain)
            }
            .padding(.horizontal, 11)
            .opacity(activeState != .inactive ? 1.0 : 0.5)
            // Tab bar items.
            ScrollView(.horizontal, showsIndicators: false) {
                ScrollViewReader { value in
                    HStack(alignment: .center, spacing: -1) {
                        ForEach(workspace.selectionState.openFileItems, id: \.id) { item in
                            TabBarItem(
                                item: item,
                                windowController: windowController,
                                workspace: workspace
                            )
                        }
                    }
                    .onAppear {
                        value.scrollTo(self.workspace.selectionState.selectedId)
                    }
                }
            }
            // TODO: Tab bar tools (e.g. split view).
        }
        .frame(height: tabBarHeight)
        .overlay(alignment: .top) {
            // When tab bar style is `xcode`, we put the top divider as an overlay.
            if prefs.preferences.general.tabBarStyle == .xcode {
                TabBarTopDivider()
            }