Make toolbar account selector button avatar match shape option. (#2098)

This commit is contained in:
Nam 2024-06-25 18:59:43 +10:00 committed by GitHub
parent f2ba08e1cc
commit 9887a81ef0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -9,6 +9,7 @@ struct ToolbarTab: ToolbarContent {
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
@Environment(UserPreferences.self) private var userPreferences
@Environment(Theme.self) private var theme
@Binding var routerPath: RouterPath
@ -35,7 +36,7 @@ struct ToolbarTab: ToolbarContent {
(UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact)
{
ToolbarItem(placement: .navigationBarLeading) {
AppAccountsSelectorView(routerPath: routerPath)
AppAccountsSelectorView(routerPath: routerPath, avatarConfig: theme.avatarShape == .circle ? .badge : .badgeRounded)
}
}
}

View file

@ -53,6 +53,7 @@ public struct AvatarView: View {
#endif
public static let embed = FrameConfig(width: 34, height: 34)
public static let badge = FrameConfig(width: 28, height: 28, cornerRadius: 14)
public static let badgeRounded = FrameConfig(width: 28, height: 28)
public static let list = FrameConfig(width: 20, height: 20, cornerRadius: 10)
public static let boost = FrameConfig(width: 12, height: 12, cornerRadius: 6)
}