Fix account button on macOS

This commit is contained in:
Arkadiusz Fal 2022-12-13 11:48:04 +01:00
parent 1cd2dbe5f7
commit 8f2b570163

View File

@ -20,7 +20,7 @@ struct AccountViewButton: View {
if let name = model.current?.app?.rawValue.capitalized {
Image(name)
.resizable()
.frame(width: 30, height: 30)
.frame(width: accountImageSize, height: accountImageSize)
} else {
Image(systemName: "globe")
}
@ -36,6 +36,14 @@ struct AccountViewButton: View {
}
}
private var accountImageSize: Double {
#if os(macOS)
20
#else
30
#endif
}
private var label: some View {
Label(model.current?.description ?? "Select Account", systemImage: "globe")
}