From 8f2b570163ac797d1ec0320d28a4781f4f472a8e Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Tue, 13 Dec 2022 11:48:04 +0100 Subject: [PATCH] Fix account button on macOS --- Shared/Navigation/AccountViewButton.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Shared/Navigation/AccountViewButton.swift b/Shared/Navigation/AccountViewButton.swift index e417e5df..8d38025e 100644 --- a/Shared/Navigation/AccountViewButton.swift +++ b/Shared/Navigation/AccountViewButton.swift @@ -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") }