mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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.
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2193daf480db861650c2b2b2562b0b369e598cb8853a6e5d93fe1fef61333619
|
||||
size 95616
|
||||
oid sha256:9b2cc1664c0b1c6cdbd6f9c1c6bed9be8c0eace88767d75de4518eaafaa738f6
|
||||
size 95676
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3640ca05f199e25637b5603a602ae1c26507b983f965141bc551c646f0baabd
|
||||
size 49118
|
||||
oid sha256:e054734b5467b099c7a90b6e0de2de5199f029481e451747368b0723ac7017cf
|
||||
size 49130
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99981ff06bd078a2ccdaa0382bc045867f7a454e998301a681e8d9a75917e812
|
||||
size 385114
|
||||
oid sha256:142ab36fd7249a84438bfc018416003e742b503e9d6bcc1f4c8c15cb8d2b9a38
|
||||
size 384757
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6860089f5d1cf068471314b4db9f7116f4892b84c9d3c6e37fc4a9ca0460fd68
|
||||
size 255509
|
||||
oid sha256:79d20d415284f9b8760ceb126266d11c7fd274e4c8920bd8eba5ead6423f0a1f
|
||||
size 255299
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:378b98e3fdff3eb309abe95cef09c4860d1bc6fcffef0d86a10da485d34b8b4f
|
||||
size 190194
|
||||
oid sha256:0aa22ee7c209c04193276c38e59b47990ae8bf76dab79ac56b48795f15394cf9
|
||||
size 190065
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:961775a35f10586c3b8ce051a769e543db0310589b66b55e542739cd9f1a3842
|
||||
size 132036
|
||||
oid sha256:ca6a9588adec7a1cd3f06db5186415eba359cfe3b5a2753cf366bb3a76c0dfcf
|
||||
size 132057
|
||||
|
||||
Reference in New Issue
Block a user