Skip to content

Commit

Permalink
Widgets // Revert certain layout methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen committed Nov 25, 2024
1 parent 4e8ef74 commit 7713fcc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
40 changes: 21 additions & 19 deletions WidgetExtension/Modules/MainWidget/Views/LargeWidgetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,29 @@ struct LargeWidgetView: View {
let accountName: String?

var body: some View {
HStack {
Spacer()
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 1 }
VStack(alignment: .leading) {
mainInfo()
Spacer(minLength: 18)
DetailInfo(entry: entry, dailyNote: dailyNote, viewConfig: viewConfig, spacing: 17)
}
.containerRelativeFrame(.horizontal, alignment: .leading) { length, _ in length / 10 * 4 }
VStack(alignment: .leading) {
ExpeditionsView(
expeditions: dailyNote.expeditionTasks
)
Spacer(minLength: 15)
if dailyNote.game == .genshinImpact, viewConfig.showMaterialsInLargeSizeWidget {
MaterialView()
VStack(alignment: .center) {
HStack {
Spacer()
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 1 }
VStack(alignment: .leading) {
mainInfo()
Spacer(minLength: 18)
DetailInfo(entry: entry, dailyNote: dailyNote, viewConfig: viewConfig, spacing: 17)
}
.containerRelativeFrame(.horizontal, alignment: .leading) { length, _ in length / 10 * 4 }
VStack(alignment: .leading) {
ExpeditionsView(
expeditions: dailyNote.expeditionTasks
)
Spacer(minLength: 15)
if dailyNote.game == .genshinImpact, viewConfig.showMaterialsInLargeSizeWidget {
MaterialView()
}
}
.containerRelativeFrame(.horizontal, alignment: .leading) { length, _ in length / 10 * 4 }
Spacer()
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 1 }
}
.containerRelativeFrame(.horizontal, alignment: .leading) { length, _ in length / 10 * 4 }
Spacer()
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 1 }
}
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 8 }
.padding()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ struct MainInfoWithDetail: View {
.containerRelativeFrame(.horizontal) { length, _ in length / 10 * 8 }
.padding()
.padding(.horizontal)
.padding(.leading)
}
}

0 comments on commit 7713fcc

Please sign in to comment.