Stop reserving space for the non-existant icon background in ListRowLabel on iOS 26. (#5822)

* Stop reserving space for the non-existant icon background in ListRowLabel on iOS 26.

* Use the .avatar label style for NotificationSettingsEditScreenRoomCell.
This commit is contained in:
Doug
2026-07-01 12:58:33 +01:00
committed by GitHub
parent 123661537a
commit 036c9ce248
208 changed files with 427 additions and 422 deletions
@@ -51,7 +51,7 @@ struct ListRowAvatarLabelStyle: LabelStyle {
public struct ListRowLabel<Icon: View>: View {
@Environment(\.isEnabled) private var isEnabled
@Environment(\.lineLimit) private var lineLimit
@ScaledMetric private var iconSize = 30.0
@ScaledMetric private var iconSize = Compound.supportsGlass ? CompoundIcon.Size.medium.value : 30 // Pre-iOS 26 includes space for a background.
var title: String?
var status: String?
@@ -145,10 +145,10 @@ public struct ListRowLabel<Icon: View>: View {
} icon: {
icon
.foregroundColor(iconForegroundColor)
.frame(width: iconSize, height: iconSize)
.frame(width: iconSize, height: iconSize) // Can be removed when dropping support for iOS 18.
.background(iconBackgroundColor)
.clipShape(RoundedRectangle(cornerRadius: 8))
.padding(.vertical, -4) // Don't allow the background to size the row.
.clipShape(RoundedRectangle(cornerRadius: Compound.supportsGlass ? 0 : 8))
.padding(.vertical, Compound.supportsGlass ? -1 : -4) // Don't allow the background to size the row.
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
.labelStyle(ListRowLabelStyle(iconAlignment: iconAlignment))
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b2cc1664c0b1c6cdbd6f9c1c6bed9be8c0eace88767d75de4518eaafaa738f6
size 95676
oid sha256:08815317819ffaa53aaf3a57c0d77faf83982c0f0995b531b29d65205ecf23f2
size 95605
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e054734b5467b099c7a90b6e0de2de5199f029481e451747368b0723ac7017cf
size 49130
oid sha256:f3bdd49d8c0a83aecaa6abfc6e19b1e7ce28410e9b59b8aecfeacb589365a424
size 49205
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:142ab36fd7249a84438bfc018416003e742b503e9d6bcc1f4c8c15cb8d2b9a38
size 384757
oid sha256:0624e48ac16514442e5154c1f17de0cc0469013e6d31adf6dcc2c4ceb33c61e8
size 384855
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79d20d415284f9b8760ceb126266d11c7fd274e4c8920bd8eba5ead6423f0a1f
size 255299
oid sha256:34f7a6dd90a0368517ff51f341fb78d9ad3a002f6715a0b2f83e209c90d544e9
size 258128
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0aa22ee7c209c04193276c38e59b47990ae8bf76dab79ac56b48795f15394cf9
size 190065
oid sha256:87a1d5fcd870f54b9d3ab6a85a2b4a57453d2ee4ca9cfde85e88edc470582c3e
size 189991
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca6a9588adec7a1cd3f06db5186415eba359cfe3b5a2753cf366bb3a76c0dfcf
size 132057
oid sha256:69a7eea88ff74ca88b49b4c2f30a0d0d639c81d9d9d9701abcbd1039ed661523
size 132964