diff --git a/Sources/Luminare/Main Window/Sidebar/LuminareSidebar.swift b/Sources/Luminare/Main Window/Sidebar/LuminareSidebar.swift index d8e04d2..ddc50f4 100644 --- a/Sources/Luminare/Main Window/Sidebar/LuminareSidebar.swift +++ b/Sources/Luminare/Main Window/Sidebar/LuminareSidebar.swift @@ -37,7 +37,7 @@ public struct LuminareSidebar: View where Content: View { .scrollContentBackground(.hidden) .padding(.horizontal, 12) .frame(maxHeight: .infinity, alignment: .top) - .padding(.top, -overflow) + .padding(.vertical, -overflow) .mask { VStack(spacing: 0) { LinearGradient( diff --git a/Sources/Luminare/Utilities/Extensions/View+Extensions.swift b/Sources/Luminare/Utilities/Extensions/View+Extensions.swift index 2ba0f1d..48e764b 100644 --- a/Sources/Luminare/Utilities/Extensions/View+Extensions.swift +++ b/Sources/Luminare/Utilities/Extensions/View+Extensions.swift @@ -276,11 +276,11 @@ public extension View { .environment(\.luminareContentMarginsTrailing, insets.trailing) } - @ViewBuilder func luminareContentMargins(_: Edge.Set, _ length: CGFloat) -> some View { - assigning(\.luminareContentMarginsTop, length) - .assigning(\.luminareContentMarginsLeading, length) - .assigning(\.luminareContentMarginsBottom, length) - .assigning(\.luminareContentMarginsTrailing, length) + @ViewBuilder func luminareContentMargins(_ edges: Edge.Set, _ length: CGFloat) -> some View { + assigning(\.luminareContentMarginsTop, edges.contains(.top) ? length : nil) + .assigning(\.luminareContentMarginsLeading, edges.contains(.leading) ? length : nil) + .assigning(\.luminareContentMarginsBottom, edges.contains(.bottom) ? length : nil) + .assigning(\.luminareContentMarginsTrailing, edges.contains(.trailing) ? length : nil) } @ViewBuilder func luminareContentMargins(_ length: CGFloat) -> some View {