mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-27 02:31:02 +00:00
Fill tab only if selected
This commit is contained in:
parent
b6c3b07ad6
commit
6246d7b0a5
2 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,7 @@ struct AppView: View {
|
||||||
.tabItem {
|
.tabItem {
|
||||||
if userPreferences.showiPhoneTabLabel {
|
if userPreferences.showiPhoneTabLabel {
|
||||||
tab.label
|
tab.label
|
||||||
|
.environment(\.symbolVariants, tab == selectedTab ? .fill : .none)
|
||||||
} else {
|
} else {
|
||||||
Image(systemName: tab.iconName)
|
Image(systemName: tab.iconName)
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,6 +182,7 @@ private struct SideBarIcon: View {
|
||||||
.font(.title2)
|
.font(.title2)
|
||||||
.fontWeight(.medium)
|
.fontWeight(.medium)
|
||||||
.foregroundColor(isSelected ? theme.tintColor : theme.labelColor)
|
.foregroundColor(isSelected ? theme.tintColor : theme.labelColor)
|
||||||
|
.symbolVariant(isSelected ? .fill : .none)
|
||||||
.scaleEffect(isHovered ? 0.8 : 1.0)
|
.scaleEffect(isHovered ? 0.8 : 1.0)
|
||||||
.onHover { isHovered in
|
.onHover { isHovered in
|
||||||
withAnimation(.interpolatingSpring(stiffness: 300, damping: 15)) {
|
withAnimation(.interpolatingSpring(stiffness: 300, damping: 15)) {
|
||||||
|
|
Loading…
Reference in a new issue