diff --git a/Multiplatform/iOS/Settings/Accounts/AccountHeaderImageView.swift b/Multiplatform/iOS/Settings/Accounts/AccountHeaderImageView.swift index 568c012bf..5fb6b5578 100644 --- a/Multiplatform/iOS/Settings/Accounts/AccountHeaderImageView.swift +++ b/Multiplatform/iOS/Settings/Accounts/AccountHeaderImageView.swift @@ -11,19 +11,25 @@ import RSCore struct AccountHeaderImageView: View { var image: RSImage - + var body: some View { - Image(rsImage: image) - .resizable() - .aspectRatio(1, contentMode: .fit) - .frame(height: 48, alignment: .center) - .padding() - + HStack(alignment: .center) { + Image(rsImage: image) + .resizable() + .scaledToFit() + .frame(height: 48, alignment: .center) + .padding() + } } } struct AccountHeaderImageView_Previews: PreviewProvider { static var previews: some View { - AccountHeaderImageView(image: AppAssets.image(for: .onMyMac)!) + Group { + AccountHeaderImageView(image: AppAssets.image(for: .onMyMac)!) + AccountHeaderImageView(image: AppAssets.image(for: .feedbin)!) + AccountHeaderImageView(image: AppAssets.accountLocalPadImage) + } + } } diff --git a/Multiplatform/iOS/Settings/Accounts/SettingsAccountLabelView.swift b/Multiplatform/iOS/Settings/Accounts/SettingsAccountLabelView.swift index 39c963480..29e3faa16 100644 --- a/Multiplatform/iOS/Settings/Accounts/SettingsAccountLabelView.swift +++ b/Multiplatform/iOS/Settings/Accounts/SettingsAccountLabelView.swift @@ -17,8 +17,8 @@ struct SettingsAccountLabelView: View { HStack { Image(rsImage: accountImage!) .resizable() - .aspectRatio(1, contentMode: .fit) - .frame(height: 32) + .scaledToFit() + .frame(width: 32, height: 32) Text(verbatim: accountLabel).font(.title) } .foregroundColor(.primary).padding(4.0) @@ -27,10 +27,23 @@ struct SettingsAccountLabelView: View { struct SettingsAccountLabelView_Previews: PreviewProvider { static var previews: some View { - SettingsAccountLabelView( - accountImage: AppAssets.image(for: .onMyMac), - accountLabel: "On My Device" - ) - .previewLayout(.fixed(width: 300, height: 44)) + List { + SettingsAccountLabelView( + accountImage: AppAssets.image(for: .onMyMac), + accountLabel: "On My Device" + ) + SettingsAccountLabelView( + accountImage: AppAssets.image(for: .feedbin), + accountLabel: "Feedbin" + ) + SettingsAccountLabelView( + accountImage: AppAssets.accountLocalPadImage, + accountLabel: "On My iPad" + ) + SettingsAccountLabelView( + accountImage: AppAssets.accountLocalPhoneImage, + accountLabel: "On My iPhone" + ) + } } }