mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-27 08:18:08 +00:00
Better TabView support
This commit is contained in:
parent
30c5c36aa1
commit
24c7d5be61
1 changed files with 11 additions and 11 deletions
|
@ -59,18 +59,18 @@ struct AppView: View {
|
||||||
updateTab(with: newTab)
|
updateTab(with: newTab)
|
||||||
})) {
|
})) {
|
||||||
ForEach(availableTabs) { tab in
|
ForEach(availableTabs) { tab in
|
||||||
Tab(value: tab) {
|
tab.makeContentView(selectedTab: $selectedTab)
|
||||||
tab.makeContentView(selectedTab: $selectedTab)
|
.tabItem {
|
||||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .tabBar)
|
if userPreferences.showiPhoneTabLabel {
|
||||||
} label: {
|
tab.label
|
||||||
if userPreferences.showiPhoneTabLabel {
|
.environment(\.symbolVariants, tab == selectedTab ? .fill : .none)
|
||||||
tab.label
|
} else {
|
||||||
.environment(\.symbolVariants, tab == selectedTab ? .fill : .none)
|
Image(systemName: tab.iconName)
|
||||||
} else {
|
}
|
||||||
Image(systemName: tab.iconName)
|
|
||||||
}
|
}
|
||||||
}
|
.tag(tab)
|
||||||
.badge(badgeFor(tab: tab))
|
.badge(badgeFor(tab: tab))
|
||||||
|
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .tabBar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.id(appAccountsManager.currentClient.id)
|
.id(appAccountsManager.currentClient.id)
|
||||||
|
|
Loading…
Reference in a new issue