mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
Update ListRowLabel with the correct icon spacing when using LiquidGlass.
This commit is contained in:
@@ -30,6 +30,8 @@ public enum ListRowPadding {
|
||||
leading: horizontal,
|
||||
bottom: 11,
|
||||
trailing: horizontal)
|
||||
|
||||
public static let labelIconSpacing: CGFloat = Compound.supportsGlass ? 12 : 16
|
||||
}
|
||||
|
||||
public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, SelectionValue: Hashable>: View {
|
||||
|
||||
@@ -15,7 +15,7 @@ struct ListRowLabelStyle: LabelStyle {
|
||||
let iconAlignment: VerticalAlignment
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
HStack(alignment: iconAlignment, spacing: 16) {
|
||||
HStack(alignment: iconAlignment, spacing: ListRowPadding.labelIconSpacing) {
|
||||
configuration.icon
|
||||
configuration.title
|
||||
}
|
||||
@@ -39,7 +39,7 @@ struct ListRowAvatarLabelStyle: LabelStyle {
|
||||
@ScaledMetric private var avatarSize = 32.0
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
HStack(alignment: .center, spacing: 16) {
|
||||
HStack(alignment: .center, spacing: ListRowPadding.labelIconSpacing) {
|
||||
configuration.icon
|
||||
.frame(width: avatarSize, height: avatarSize)
|
||||
.padding(.vertical, -5) // Don't allow the avatar to size the row.
|
||||
|
||||
Reference in New Issue
Block a user