@@ -21,7 +21,7 @@ struct HomeTimelineScreen: View {
2121
2222 var body : some View {
2323 GeometryReader { proxy in
24- let headerHeight = 72 + proxy. safeAreaInsets. top
24+ let headerHeight = 60 + proxy. safeAreaInsets. top
2525 StateView ( state: presenter. state. tabState) { state in
2626 let tabs : [ TimelineTabItem ] = state. cast ( TimelineTabItem . self)
2727 let tab = tabs [ selectedTabIndex]
@@ -40,7 +40,7 @@ struct HomeTimelineScreen: View {
4040 } )
4141 . onScrollPhaseChange ( { oldPhase, newPhase, context in
4242 if !newPhase. isScrolling && ( headerOffset != 0 || headerOffset != headerHeight) {
43- withAnimation ( . snappy ( duration : 0.25 , extraBounce : 0 ) ) {
43+ withAnimation ( . spring ) {
4444 if headerOffset > ( headerHeight * 0.5 ) {
4545 headerOffset = headerHeight
4646 } else {
@@ -60,23 +60,30 @@ struct HomeTimelineScreen: View {
6060 ) {
6161 ScrollView ( . horizontal) {
6262 GlassEffectContainer {
63- HStack {
63+ HStack (
64+ spacing: 8 ,
65+ ) {
6466 ForEach ( 0 ..< tabs. count, id: \. self) { index in
6567 let tab = tabs [ index]
66- Button {
67- selectedTabIndex = index
68- } label: {
69- Label {
70- TabTitle ( title: tab. metaData. title)
71- } icon: {
72- TabIcon ( icon: tab. metaData. icon, accountType: tab. account, size: 24 )
73- . font ( . title)
74- }
68+
69+ Label {
70+ TabTitle ( title: tab. metaData. title)
71+ . font ( . subheadline)
72+ } icon: {
73+ TabIcon ( icon: tab. metaData. icon, accountType: tab. account, size: 24 )
74+ . font ( . title)
7575 }
76- . if ( selectedTabIndex == index) { button in
77- button. buttonStyle ( . borderedProminent)
78- } else: { button in
79- button. buttonStyle ( . bordered)
76+ . padding ( . horizontal)
77+ . padding ( . vertical, 8 )
78+ . foregroundStyle ( selectedTabIndex == index ? Color . white : . primary)
79+ . background (
80+ Capsule ( )
81+ . foregroundColor ( selectedTabIndex == index ? . accentColor : Color ( . systemBackground) )
82+ )
83+ . onTapGesture {
84+ withAnimation ( . spring) {
85+ selectedTabIndex = index
86+ }
8087 }
8188 }
8289 if case . success = onEnum ( of: presenter. state. user) {
@@ -108,8 +115,9 @@ struct HomeTimelineScreen: View {
108115 . buttonStyle ( . glass)
109116 }
110117 }
111- . padding ( )
112- . background ( Color ( . systemGroupedBackground) )
118+ . padding ( . horizontal)
119+ . padding ( . vertical, 8 )
120+ . background ( . regularMaterial)
113121 . offset ( y: - headerOffset)
114122 }
115123 . toolbarVisibility ( . hidden, for: . navigationBar)
0 commit comments