Skip to content

Commit 2770ba5

Browse files
Merge pull request #8 from paololeonardi/remove-hardcoded-styling
Remove hardcoded styling and unused colors from DiffRenderer
2 parents d773f17 + 8d17ce0 commit 2770ba5

4 files changed

Lines changed: 0 additions & 37 deletions

File tree

Sources/gitdiff/Core/PlatformColors.swift

Lines changed: 0 additions & 31 deletions
This file was deleted.

Sources/gitdiff/Views/DiffFileView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,4 @@ struct DiffFileView: View {
110110

111111
DiffFileView(file: sampleFile)
112112
.padding()
113-
.background(Color.appBackground)
114113
}

Sources/gitdiff/Views/DiffLineView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,4 @@ struct DiffLineView: View {
142142
)
143143
)
144144
}
145-
.background(Color.appBackground)
146145
}

Sources/gitdiff/Views/DiffRenderer.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public struct DiffRenderer: View {
4040
.font(.caption)
4141
.foregroundColor(.secondary)
4242
}
43-
.padding()
4443
.frame(maxWidth: .infinity, maxHeight: .infinity)
4544
} else if let files = parsedFiles, files.isEmpty {
4645
VStack(spacing: 20) {
@@ -58,18 +57,15 @@ public struct DiffRenderer: View {
5857
.multilineTextAlignment(.center)
5958
.padding(.horizontal)
6059
}
61-
.padding()
6260
.frame(maxWidth: .infinity, maxHeight: .infinity)
6361
} else if let files = parsedFiles {
6462
VStack(spacing: 16) {
6563
ForEach(files) { file in
6664
DiffFileView(file: file)
6765
}
6866
}
69-
.padding()
7067
}
7168
}
72-
.background(Color.appBackground)
7369
.task(id: diffText) {
7470
self.parsedFiles = try? await DiffParser.parse(diffText)
7571
}

0 commit comments

Comments
 (0)