Skip to content

Commit f0914f9

Browse files
committed
Update align
1 parent c0cbea0 commit f0914f9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Sources/SwiftNEW/SwiftNEW.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,15 @@ public struct SwiftNEW: View {
157157
appIcon
158158
}
159159
VStack(alignment: align) {
160+
if align == .center {
161+
appIcon
162+
}
160163
Text("What's New in").bold().font(.largeTitle)
161164
Text("Version \(Bundle.versionBuild)").bold().font(.title).foregroundColor(.secondary)
162165
}
166+
if align == .trailing {
167+
appIcon
168+
}
163169
}
164170
}
165171
#elseif os(macOS)
@@ -181,8 +187,14 @@ public struct SwiftNEW: View {
181187
public var closeCurrentButton: some View {
182188
Button(action: { show = false }) {
183189
HStack{
190+
if align == .trailing {
191+
Spacer()
192+
}
184193
Text("Continue").bold()
185194
Image(systemName: "arrow.right.circle.fill")
195+
if align == .leading {
196+
Spacer()
197+
}
186198
}.font(.body)
187199
.frame(width: 300, height: 50)
188200
#if os(iOS)
@@ -245,8 +257,14 @@ public struct SwiftNEW: View {
245257
public var closeHistoryButton: some View {
246258
Button(action: { historySheet = false }) {
247259
HStack{
260+
if align == .trailing {
261+
Spacer()
262+
}
248263
Text("Return").bold()
249264
Image(systemName: "arrow.down.circle.fill")
265+
if align == .leading {
266+
Spacer()
267+
}
250268
}.font(.body)
251269
.frame(width: 300, height: 50)
252270
#if os(iOS)

0 commit comments

Comments
 (0)