Improve profiles layout on small devices (#917)

- Smaller iCloud/TV icons
- Smaller marker width
- Less spacing before info button
This commit is contained in:
Davide 2024-11-22 17:05:46 +01:00 committed by GitHub
parent bd237c4a6f
commit 13118a5e2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,11 +28,17 @@ import CommonUtils
import PassepartoutKit
import SwiftUI
struct ProfileRowView: View, Routable {
struct ProfileRowView: View, Routable, SizeClassProviding {
@EnvironmentObject
private var theme: Theme
@Environment(\.horizontalSizeClass)
var hsClass
@Environment(\.verticalSizeClass)
var vsClass
let style: ProfileCardView.Style
@ObservedObject
@ -64,16 +70,18 @@ struct ProfileRowView: View, Routable {
cardView
}
Spacer()
HStack(spacing: 10.0) {
HStack(spacing: 8) {
ProfileAttributesView(
attributes: attributes,
isRemoteImportingEnabled: profileManager.isRemoteImportingEnabled
)
.imageScale(isBigDevice ? .large : .medium)
ProfileInfoButton(preview: preview) {
flow?.onEditProfile($0)
}
.imageScale(.large)
}
.imageScale(.large)
}
Spacer(minLength: .zero)
}
@ -101,7 +109,7 @@ private struct MarkerView: View {
PurchaseRequiredButton(features: requiredFeatures, paywallReason: .constant(nil))
}
}
.frame(width: 24.0)
.frame(width: 20)
}
}