Skip to content

Commit 4383725

Browse files
committed
fix alignment issues
1 parent be85e8a commit 4383725

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

damus/Views/Camera/CameraView.swift

+27-31
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct CameraView: View {
4040
} label: {
4141
ZStack {
4242
Circle()
43-
.fill( model.isRecording ? .red : DamusColors.white)
43+
.fill( model.isRecording ? .red : DamusColors.black)
4444
.frame(width: model.isRecording ? 85 : 65, height: model.isRecording ? 85 : 65, alignment: .center)
4545

4646
Circle()
@@ -70,7 +70,6 @@ struct CameraView: View {
7070
.aspectRatio(contentMode: .fill)
7171
.frame(width: 60, height: 60)
7272
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
73-
// .animation(.spring())
7473
}
7574
if model.isPhotoProcessing {
7675
ProgressView()
@@ -123,7 +122,7 @@ struct CameraView: View {
123122
NavigationView {
124123
GeometryReader { reader in
125124
ZStack {
126-
Color.black.edgesIgnoringSafeArea(.all)
125+
DamusColors.black.edgesIgnoringSafeArea(.all)
127126

128127
CameraPreview(session: model.session)
129128
.padding(.bottom, 175)
@@ -173,36 +172,33 @@ struct CameraView: View {
173172

174173
Spacer()
175174

176-
VStack {
175+
HStack(alignment: .center) {
176+
if !model.mediaItems.isEmpty {
177+
NavigationLink(destination: Text(model.mediaItems.map { $0.url.absoluteString }.joined(separator: ", "))) {
178+
capturedPhotoThumbnail
179+
}
180+
.frame(width: 100, alignment: .leading)
181+
}
182+
177183
Spacer()
178184

179-
HStack {
180-
if !model.mediaItems.isEmpty {
181-
NavigationLink(destination: Text(model.mediaItems.map { $0.url.absoluteString }.joined(separator: ", "))) {
182-
capturedPhotoThumbnail
183-
}
184-
}
185-
186-
Spacer()
187-
188-
captureButton
189-
190-
Spacer()
191-
192-
if !model.mediaItems.isEmpty {
193-
Button(action: {
194-
action(model.mediaItems)
195-
presentationMode.wrappedValue.dismiss()
196-
model.stop()
197-
}) {
198-
Text("Upload")
199-
.frame(width: 100, height: 50, alignment: .center)
200-
.foregroundColor(DamusColors.white)
201-
.overlay {
202-
RoundedRectangle(cornerRadius: 24)
203-
.stroke(DamusColors.white, lineWidth: 2)
204-
}
205-
}
185+
captureButton
186+
187+
Spacer()
188+
189+
if !model.mediaItems.isEmpty {
190+
Button(action: {
191+
action(model.mediaItems)
192+
presentationMode.wrappedValue.dismiss()
193+
model.stop()
194+
}) {
195+
Text("Upload")
196+
.frame(width: 100, height: 40, alignment: .center)
197+
.foregroundColor(DamusColors.white)
198+
.overlay {
199+
RoundedRectangle(cornerRadius: 24)
200+
.stroke(DamusColors.white, lineWidth: 2)
201+
}
206202
}
207203
}
208204
}

0 commit comments

Comments
 (0)