Fixes add account sheet sizing
Picker images don’t resize so they’ve been commented out
This commit is contained in:
parent
13e28f6f3f
commit
ffc5978a82
|
@ -31,6 +31,8 @@ struct AccountsPreferencesView: View {
|
|||
switch viewModel.sheetToShow {
|
||||
case .add:
|
||||
AddAccountView(preferencesModel: viewModel)
|
||||
.frame(width: 300, height: 200)
|
||||
.padding()
|
||||
case .credentials:
|
||||
EditAccountCredentialsView(viewModel: viewModel)
|
||||
case .none:
|
||||
|
|
|
@ -15,12 +15,12 @@ struct AddAccountPickerRow: View {
|
|||
|
||||
var body: some View {
|
||||
HStack {
|
||||
if let img = AppAssets.image(for: accountType) {
|
||||
Image(rsImage: img)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 15, height: 15)
|
||||
}
|
||||
// if let img = AppAssets.image(for: accountType) {
|
||||
// Image(rsImage: img)
|
||||
// .resizable()
|
||||
// .aspectRatio(contentMode: .fit)
|
||||
// .frame(width: 15, height: 15)
|
||||
// }
|
||||
|
||||
switch accountType {
|
||||
case .onMyMac:
|
||||
|
|
|
@ -17,16 +17,16 @@ struct AddAccountView: View {
|
|||
|
||||
var body: some View {
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text("Add an Account").font(.headline)
|
||||
Form {
|
||||
Text("Add an Account").font(.headline)
|
||||
|
||||
Picker("Account Type",
|
||||
selection: $viewModel.selectedAddAccount,
|
||||
content: {
|
||||
ForEach(0..<viewModel.addableAccountTypes.count, content: { i in
|
||||
AddAccountPickerRow(accountType: viewModel.addableAccountTypes[i]).tag(viewModel.addableAccountTypes[i])
|
||||
})
|
||||
})
|
||||
}).pickerStyle(MenuPickerStyle())
|
||||
|
||||
switch viewModel.selectedAddAccount {
|
||||
case .onMyMac:
|
||||
|
@ -44,7 +44,6 @@ struct AddAccountView: View {
|
|||
case .newsBlur:
|
||||
userNameAndPasswordView
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
HStack {
|
||||
|
@ -82,8 +81,8 @@ struct AddAccountView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.frame(width: 300, height: 200, alignment: .top)
|
||||
.padding()
|
||||
|
||||
|
||||
.onChange(of: viewModel.selectedAddAccount) { _ in
|
||||
viewModel.resetUserEntries()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue