Skip to content

Commit

Permalink
Fix layout of multiline modules (#916)
Browse files Browse the repository at this point in the history
- Align to .leading in multi-line
- Wrap profile rows into top/bottom spacers to adjust to tallest cell in
grid

See #915
  • Loading branch information
keeshux authored Nov 22, 2024
1 parent fb0d1ab commit bd237c4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct ProfileCardView: View {
.themeTruncating()

Text(preview.subtitle ?? Strings.Views.Profiles.Rows.noModules)
.multilineTextAlignment(.leading)
.font(.subheadline)
.foregroundStyle(.secondary)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,28 @@ struct ProfileRowView: View, Routable {
var flow: ProfileFlow?

var body: some View {
HStack {
Group {
if withMarker {
markerView
VStack(spacing: .zero) {
Spacer(minLength: .zero)
HStack {
Group {
if withMarker {
markerView
}
cardView
}
cardView
}
Spacer()
HStack(spacing: 10.0) {
ProfileAttributesView(
attributes: attributes,
isRemoteImportingEnabled: profileManager.isRemoteImportingEnabled
)
ProfileInfoButton(preview: preview) {
flow?.onEditProfile($0)
Spacer()
HStack(spacing: 10.0) {
ProfileAttributesView(
attributes: attributes,
isRemoteImportingEnabled: profileManager.isRemoteImportingEnabled
)
ProfileInfoButton(preview: preview) {
flow?.onEditProfile($0)
}
}
.imageScale(.large)
}
.imageScale(.large)
Spacer(minLength: .zero)
}
}
}
Expand Down

0 comments on commit bd237c4

Please sign in to comment.