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,18 +44,15 @@ struct WhatsNewView: View {
.bold() .bold()
AboutView() AboutView()
Divider() Divider()
ForEach(whatsNewChunks) { new in VStack(alignment: .leading) {
WhatsNewChunkView( ForEach(whatsNewChunks) { new in
symbol: new.symbol, WhatsNewChunkView(
title: new.title, symbol: new.symbol,
subtitle: new.subtitle title: new.title,
) 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,23 +95,21 @@ 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, 15)
.padding(.trailing, 5) VStack(alignment: .leading) {
VStack(alignment: .leading) { Text(title)
Text(title) .font(.headline)
.font(.headline) .bold()
.bold() Text(subtitle)
Text(subtitle) .foregroundStyle(.gray)
.foregroundStyle(.gray) .font(.subheadline)
.font(.subheadline)
}
} }
// } }
} }
} }