fixed whatsnewview's horizontal layout

This commit is contained in:
neon443
2025-05-13 11:07:03 +01:00
parent f252359eb1
commit 595c2b74c5

View File

@@ -44,6 +44,7 @@ struct WhatsNewView: View {
.bold() .bold()
AboutView() AboutView()
Divider() Divider()
VStack(alignment: .leading) {
ForEach(whatsNewChunks) { new in ForEach(whatsNewChunks) { new in
WhatsNewChunkView( WhatsNewChunkView(
symbol: new.symbol, symbol: new.symbol,
@@ -51,11 +52,7 @@ struct WhatsNewView: View {
subtitle: new.subtitle subtitle: new.subtitle
) )
} }
} }
.onDisappear {
settingsModel.settings.prevAppVersion = getVersion()+getBuildID()
settingsModel.saveSettings()
} }
} }
Button() { Button() {
@@ -78,6 +75,10 @@ struct WhatsNewView: View {
$0.presentationBackground(.ultraThinMaterial) $0.presentationBackground(.ultraThinMaterial)
} }
} }
.onDisappear {
settingsModel.settings.prevAppVersion = getVersion()+getBuildID()
settingsModel.saveSettings()
}
} }
} }
@@ -94,14 +95,13 @@ struct WhatsNewChunkView: View {
@State var title: String @State var title: String
@State var subtitle: String @State var subtitle: String
var body: some View { var body: some View {
// GeometryReader { geo in
HStack { HStack {
Image(systemName: symbol) Image(systemName: symbol)
.resizable() .resizable()
.scaledToFit() .scaledToFit()
.frame(width: 30, height: 30) .frame(width: 30, height: 30)
.foregroundStyle(.accent) .foregroundStyle(.accent)
.padding(.trailing, 5) .padding(.trailing, 15)
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(title) Text(title)
.font(.headline) .font(.headline)
@@ -111,6 +111,5 @@ struct WhatsNewChunkView: View {
.font(.subheadline) .font(.subheadline)
} }
} }
// }
} }
} }