Fix tab icon
This commit is contained in:
@ -70,7 +70,7 @@ struct ProfileView: View {
|
||||
innerBody
|
||||
}
|
||||
.navigationTitle(LocalText.genericProfile)
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
#elseif os(macOS)
|
||||
List {
|
||||
innerBody
|
||||
|
||||
@ -3,12 +3,11 @@ import SwiftUI
|
||||
|
||||
struct CustomTabBar: View {
|
||||
@Binding var selectedTab: String
|
||||
@Namespace var animation
|
||||
var body: some View {
|
||||
HStack(spacing: 0) {
|
||||
TabBarButton(key: "following", image: Image.tabFollowing, selectedTab: $selectedTab, animation: animation)
|
||||
TabBarButton(key: "inbox", image: Image.tabLibrary, selectedTab: $selectedTab, animation: animation)
|
||||
TabBarButton(key: "profile", image: Image.tabHighlights, selectedTab: $selectedTab, animation: animation)
|
||||
TabBarButton(key: "following", image: Image.tabFollowing, selectedTab: $selectedTab)
|
||||
TabBarButton(key: "inbox", image: Image.tabLibrary, selectedTab: $selectedTab)
|
||||
TabBarButton(key: "profile", image: Image.tabProfile, selectedTab: $selectedTab)
|
||||
}
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 40)
|
||||
@ -20,13 +19,10 @@ struct TabBarButton: View {
|
||||
let key: String
|
||||
let image: Image
|
||||
@Binding var selectedTab: String
|
||||
var animation: Namespace.ID
|
||||
|
||||
var body: some View {
|
||||
Button(action: {
|
||||
withAnimation(.spring()) {
|
||||
selectedTab = key
|
||||
}
|
||||
selectedTab = key
|
||||
}, label: {
|
||||
image
|
||||
.resizable()
|
||||
|
||||
@ -11,6 +11,7 @@ public extension Image {
|
||||
static var tabLibrary: Image { Image("_tab_library", bundle: .module).renderingMode(.template) }
|
||||
static var tabSearch: Image { Image("_tab_search", bundle: .module).renderingMode(.template) }
|
||||
static var tabHighlights: Image { Image("_tab_highlights", bundle: .module).renderingMode(.template) }
|
||||
static var tabProfile: Image { Image("_tab_profile", bundle: .module).renderingMode(.template) }
|
||||
|
||||
static var pinRotated: Image { Image("pin-rotated", bundle: .module) }
|
||||
|
||||
|
||||
24
apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/_tab_profile.imageset/Contents.json
vendored
Normal file
24
apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/_tab_profile.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
11
apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/_tab_profile.imageset/Frame.svg
vendored
Normal file
11
apple/OmnivoreKit/Sources/Views/Images/Images.xcassets/_tab_profile.imageset/Frame.svg
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6482_4724)">
|
||||
<path d="M5.82823 22.4403H18.1683C19.4433 22.4403 20.4604 21.3206 20.2787 20.0572C19.9504 17.7944 18.7779 16.0269 16.5415 15.0128C13.0857 13.4446 9.47455 13.3919 6.27083 15.7778C4.78474 16.8828 4.00506 18.3308 3.72954 19.9898C3.51263 21.2737 4.5268 22.4403 5.82823 22.4403Z" fill="#8E8E93"/>
|
||||
<path d="M12.0715 12.8117C14.6626 12.7824 16.8639 10.5899 16.82 8.08376C16.776 5.54541 14.5337 3.40568 11.9601 3.44086C9.34851 3.47896 7.24103 5.60696 7.26448 8.18929C7.28499 10.7745 9.43351 12.841 12.0715 12.8117Z" fill="#8E8E93"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6482_4724">
|
||||
<rect width="24" height="24" fill="white" transform="translate(0 0.94043)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 807 B |
Reference in New Issue
Block a user