mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 17:51:01 +00:00
Make toolbar account selector button avatar match shape option. (#2098)
This commit is contained in:
parent
f2ba08e1cc
commit
9887a81ef0
2 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ struct ToolbarTab: ToolbarContent {
|
||||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||||
|
|
||||||
@Environment(UserPreferences.self) private var userPreferences
|
@Environment(UserPreferences.self) private var userPreferences
|
||||||
|
@Environment(Theme.self) private var theme
|
||||||
|
|
||||||
@Binding var routerPath: RouterPath
|
@Binding var routerPath: RouterPath
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ struct ToolbarTab: ToolbarContent {
|
||||||
(UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact)
|
(UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact)
|
||||||
{
|
{
|
||||||
ToolbarItem(placement: .navigationBarLeading) {
|
ToolbarItem(placement: .navigationBarLeading) {
|
||||||
AppAccountsSelectorView(routerPath: routerPath)
|
AppAccountsSelectorView(routerPath: routerPath, avatarConfig: theme.avatarShape == .circle ? .badge : .badgeRounded)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ public struct AvatarView: View {
|
||||||
#endif
|
#endif
|
||||||
public static let embed = FrameConfig(width: 34, height: 34)
|
public static let embed = FrameConfig(width: 34, height: 34)
|
||||||
public static let badge = FrameConfig(width: 28, height: 28, cornerRadius: 14)
|
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 list = FrameConfig(width: 20, height: 20, cornerRadius: 10)
|
||||||
public static let boost = FrameConfig(width: 12, height: 12, cornerRadius: 6)
|
public static let boost = FrameConfig(width: 12, height: 12, cornerRadius: 6)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue