Commit b35b748620
Verified · cmc
Layout: unified · split
Sources/Orgstar/Sidebar.swift +9
| @@ -142,6 +142,7 @@ struct SidebarBar<Content: View>: View { | ||
| 142 | 142 | @Binding var showsAgenda: Bool |
| 143 | 143 | @ViewBuilder var content: Content |
| 144 | 144 | @Environment(\.orgTheme) private var theme |
| 145 | @Environment(\.colorScheme) private var colorScheme | |
| 145 | 146 | |
| 146 | 147 | var body: some View { |
| 147 | 148 | HStack(spacing: 6) { |
| @@ -157,6 +158,14 @@ struct SidebarBar<Content: View>: View { | ||
| 157 | 158 | .foregroundStyle(theme.color("sidebar-foreground") ?? .primary) |
| 158 | 159 | .padding(.horizontal, 10) |
| 159 | 160 | .padding(.vertical, 7) |
| 161 | // Solid, so the rows scrolling under the bar don't show through its buttons. | |
| 162 | .background { | |
| 163 | if let color = theme.color("sidebar-background", in: colorScheme) { | |
| 164 | color | |
| 165 | } else { | |
| 166 | Rectangle().fill(.ultraThickMaterial) | |
| 167 | } | |
| 168 | } | |
| 160 | 169 | .overlay(alignment: .top) { Divider() } |
| 161 | 170 | } |
| 162 | 171 | } |