Skip to content

Commit

Permalink
🚑️ Fix content margins handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Dec 19, 2024
1 parent b1630a1 commit 239f177
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/Luminare/Main Window/Sidebar/LuminareSidebar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public struct LuminareSidebar<Content>: 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(
Expand Down
10 changes: 5 additions & 5 deletions Sources/Luminare/Utilities/Extensions/View+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 239f177

Please sign in to comment.