From f369a30a64a3b43b88831419943b023f8091c232 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 20 Jan 2026 14:12:00 +0200 Subject: [PATCH] Fix the setting button's layout and animation on liquid glass --- ElementX/Sources/Other/Avatars.swift | 6 +----- ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift | 2 +- .../Screens/Spaces/SpacesScreen/View/SpacesScreen.swift | 2 +- .../PreviewTests/homeScreen.Empty-iPad-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Empty-iPad-pseudo.png | 4 ++-- .../PreviewTests/homeScreen.Empty-iPhone-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Empty-iPhone-pseudo.png | 4 ++-- .../PreviewTests/homeScreen.Loaded-iPad-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Loaded-iPad-pseudo.png | 4 ++-- .../PreviewTests/homeScreen.Loaded-iPhone-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Loaded-iPhone-pseudo.png | 4 ++-- .../PreviewTests/homeScreen.Loading-iPad-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Loading-iPad-pseudo.png | 4 ++-- .../PreviewTests/homeScreen.Loading-iPhone-en-GB.png | 4 ++-- .../PreviewTests/homeScreen.Loading-iPhone-pseudo.png | 4 ++-- .../PreviewTests/spacesScreen.Empty-iPad-en-GB.png | 4 ++-- .../PreviewTests/spacesScreen.Empty-iPad-pseudo.png | 4 ++-- .../PreviewTests/spacesScreen.iPad-en-GB-0.png | 4 ++-- .../PreviewTests/spacesScreen.iPad-pseudo-0.png | 4 ++-- 19 files changed, 35 insertions(+), 39 deletions(-) diff --git a/ElementX/Sources/Other/Avatars.swift b/ElementX/Sources/Other/Avatars.swift index b80c0a454..4e558e308 100644 --- a/ElementX/Sources/Other/Avatars.swift +++ b/ElementX/Sources/Other/Avatars.swift @@ -88,11 +88,7 @@ enum UserAvatarSizeOnScreen { var value: CGFloat { switch self { case .chats, .spaces: - if #available(iOS 26, *) { - return 40 - } else { - return 32 - } + return 32 case .timeline: return 32 case .readReceipt: diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift index 2efc8ee5b..80a0bb31a 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift @@ -36,8 +36,8 @@ struct HomeScreen: View { private var toolbar: some ToolbarContent { ToolbarItem(placement: .navigationBarLeading) { settingsButton + .buttonStyle(.borderless) } - .backportSharedBackgroundVisibility(.hidden) ToolbarItem(placement: .primaryAction) { if #available(iOS 26, *) { diff --git a/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift b/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift index e424c71a3..2a48f7a3a 100644 --- a/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift +++ b/ElementX/Sources/Screens/Spaces/SpacesScreen/View/SpacesScreen.swift @@ -108,9 +108,9 @@ struct SpacesScreen: View { .accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar) .compositingGroup() } + .buttonStyle(.borderless) .accessibilityLabel(L10n.commonSettings) } - .backportSharedBackgroundVisibility(.hidden) ToolbarItem(placement: .principal) { // Hides the navigationTitle (which is set for the navigation stack label). diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-en-GB.png index 52650a1c5..b88878645 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e49adca0a1b9ac22eefa058b81a3643fb16d34474ff85a86e24562ed0d5dbbd0 -size 118155 +oid sha256:c8c159ba3072eb5b25b9b65f8c05e34ff83eaaf34076943c9b86b77ed1753688 +size 118173 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-pseudo.png index f03c38e00..378cbb338 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4dd649afd0e1220aa783196a449ffa81c498bce7f80fe4cff2d2f312a2867407 -size 121797 +oid sha256:3c7afd01baafd30d1611c573b7498cea35743fe54b4a239aa21beaa34dccd360 +size 121815 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-en-GB.png index 5651612af..8bdc7ee5e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:885dc9cb49642f063000a855f098c67be175976ef8ab8520efa924eff516415b -size 61346 +oid sha256:b54f511335f4ee355f1504591ab3f8bd91d5d6afd9677b57f4f1bebd5b62e17c +size 61092 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-pseudo.png index 64e9a7586..5b40524e6 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Empty-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64e9d67eb7cce3b407ffcfd671e50c6fd9f22e3660bb258ca8c7adf28ad3d53d -size 69613 +oid sha256:ebcc4e4b7c57078c19028b697d4801ccd4cce548bef808de917e3c72f7289657 +size 69353 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-en-GB.png index 815a9963f..2a137c1d4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1d810fe1bf7305326cca252dbe17b24650faf04e446d34bf88e70d2092f7a05 -size 298434 +oid sha256:be1f7079086daf9ecf19986c8754f5982cc46ae17f245cd856094753a016aedb +size 297800 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-pseudo.png index 113e4ecba..bf3aa11fe 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:411eca90bd743660179df9f8663ce862158fe20faf3b50bd6b603aba4f99a3f2 -size 308200 +oid sha256:9389df8ad4cfca0acaca46b2db5536b670c4e2deb52556b42ccaf894ce5c6e7a +size 307440 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-en-GB.png index 5697c2dd8..94bd97503 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f42f9de17a2548676fdcbf416589fc6c1a9e9cffec13286760146d1a9ed1afa2 -size 206610 +oid sha256:19d2cef722731cef990d6a4fa8d9ef8094391dc2c778beec414612e7bfbe66fd +size 206598 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-pseudo.png index 3802c6604..fcad1b586 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loaded-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aad81015a0079425cc6346de9ea142429fc08c407e5a872c6d1a3fd2765edbf2 -size 211474 +oid sha256:0858954dd3a2017000af193a6f0013e906a41be66ef228a62a2221442a89beda +size 211440 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-en-GB.png index 66f40c6b0..c64f2cc58 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d605e43413d5f4b87bef5559980f739eb33e9945c144c5ff915834098801655c -size 118807 +oid sha256:671d3b7d2366747363d210078d7873a2d8eec906e13fb60654546d50ee5d5432 +size 118850 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-pseudo.png index 66f40c6b0..c64f2cc58 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d605e43413d5f4b87bef5559980f739eb33e9945c144c5ff915834098801655c -size 118807 +oid sha256:671d3b7d2366747363d210078d7873a2d8eec906e13fb60654546d50ee5d5432 +size 118850 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-en-GB.png index 6b3cefdf2..e1affddc4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6629f155f1f13d3e0452390adbbffb3e344e238173b64fe13764be66753d047 -size 60488 +oid sha256:56c59660532312df79740cd14f1c752f02f71c4666fb05ed5fc184a5f6f346d2 +size 60325 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-pseudo.png index 6b3cefdf2..e1affddc4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreen.Loading-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6629f155f1f13d3e0452390adbbffb3e344e238173b64fe13764be66753d047 -size 60488 +oid sha256:56c59660532312df79740cd14f1c752f02f71c4666fb05ed5fc184a5f6f346d2 +size 60325 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-en-GB.png index c33f55dcf..25be16f5a 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c822fd09de359fbb83a50d234ef6631c716bab8a92002844fbf19209f762154 -size 114486 +oid sha256:f33ffbef9562c5e11f4c096a5e4a2b11eb3121048bdb0fcb621e4d395a14a446 +size 114619 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-pseudo.png index 970652042..887ea8609 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.Empty-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a639262d2a1168ce5fc49d6d7742ae64d64d49cd49a54893fca17c93c0cc3893 -size 121829 +oid sha256:c1ccd6c28c1da50cdf4606ee4263d6889de53bf3370c0be454938c3eb088da8a +size 121960 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-en-GB-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-en-GB-0.png index 256f30f3d..3efb1b051 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-en-GB-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-en-GB-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6836c92e2c4d7a67aa39d51a82612a7831d64e8c68a0e8e9b7a0605d95f4787 -size 196165 +oid sha256:ef32916bc38748738e8b90862b19d9aca4d2d969fba00cec54116b37618724c0 +size 196313 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-pseudo-0.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-pseudo-0.png index c9671c554..822e2589d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-pseudo-0.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/spacesScreen.iPad-pseudo-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d80389d5af6f4ce7d137b587db88504ba40f2573601afc3dc1a64df333c4d0aa -size 229132 +oid sha256:17e3c1ae4de418af3c42fe4b43fb06aa95ace95c7243c5b724a4bce6f27637ae +size 229278