From 82743587ddb818f76b3780c51befb7da4f7db61c Mon Sep 17 00:00:00 2001 From: Guillaume Flambard Date: Sun, 6 Sep 2026 19:06:01 +0200 Subject: [PATCH] fix: size the account settings avatar to the window, not the device screen NCAccountSettingsView is presented as a page sheet, so the width available to it is the sheet's, not the display's. Framing the avatar at UIScreen.main.bounds.width asks for a child wider than its container whenever the presentation is narrower than the screen: a page sheet on iPad, Split View, Slide Over or Stage Manager. Constrain the height and let the width fill what the parent offers, which keeps the avatar 65pt tall and centred at every window size. UIScreen.main is also deprecated in iOS 27, where layout is expected to follow the scene rather than the device. Signed-off-by: Guillaume Flambard Assisted-by: claude-code:claude-opus-5 --- iOSClient/Account/Account Settings/NCAccountSettingsView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iOSClient/Account/Account Settings/NCAccountSettingsView.swift b/iOSClient/Account/Account Settings/NCAccountSettingsView.swift index fed8b841fb..d5eecfa971 100644 --- a/iOSClient/Account/Account Settings/NCAccountSettingsView.swift +++ b/iOSClient/Account/Account Settings/NCAccountSettingsView.swift @@ -36,7 +36,8 @@ struct NCAccountSettingsView: View { Image(uiImage: avatar) .resizable() .scaledToFit() - .frame(width: UIScreen.main.bounds.width, height: 65) + .frame(height: 65) + .frame(maxWidth: .infinity) if let statusImage = status.statusImage { ZStack { Circle()