Skip to content

Commit 9887a81

Browse files
Make toolbar account selector button avatar match shape option. (Dimillian#2098)
1 parent f2ba08e commit 9887a81

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

IceCubesApp/App/Tabs/ToolbarTab.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ struct ToolbarTab: ToolbarContent {
99
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
1010

1111
@Environment(UserPreferences.self) private var userPreferences
12+
@Environment(Theme.self) private var theme
1213

1314
@Binding var routerPath: RouterPath
1415

@@ -35,7 +36,7 @@ struct ToolbarTab: ToolbarContent {
3536
(UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact)
3637
{
3738
ToolbarItem(placement: .navigationBarLeading) {
38-
AppAccountsSelectorView(routerPath: routerPath)
39+
AppAccountsSelectorView(routerPath: routerPath, avatarConfig: theme.avatarShape == .circle ? .badge : .badgeRounded)
3940
}
4041
}
4142
}

Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public struct AvatarView: View {
5353
#endif
5454
public static let embed = FrameConfig(width: 34, height: 34)
5555
public static let badge = FrameConfig(width: 28, height: 28, cornerRadius: 14)
56+
public static let badgeRounded = FrameConfig(width: 28, height: 28)
5657
public static let list = FrameConfig(width: 20, height: 20, cornerRadius: 10)
5758
public static let boost = FrameConfig(width: 12, height: 12, cornerRadius: 6)
5859
}

0 commit comments

Comments
 (0)