Fix center alignment and larger hit test area for Timeline switcher
Changelog-None Signed-off-by: Askeew <askeew@hotmail.com>
This commit is contained in:
@@ -36,10 +36,9 @@ struct PostingTimelineSwitcherView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "square.stack")
|
Color.clear
|
||||||
.foregroundColor(DamusColors.purple)
|
|
||||||
.frame(height: 35)
|
|
||||||
}
|
}
|
||||||
|
.frame(width: 50, height: 35)
|
||||||
.menuOrder(.fixed)
|
.menuOrder(.fixed)
|
||||||
.accessibilityLabel(NSLocalizedString("Timeline switcher, select \(TimelineSource.follows.description) or \(TimelineSource.favorites.description)", comment: "Accessibility label for the timeline switcher button at the topbar"))
|
.accessibilityLabel(NSLocalizedString("Timeline switcher, select \(TimelineSource.follows.description) or \(TimelineSource.favorites.description)", comment: "Accessibility label for the timeline switcher button at the topbar"))
|
||||||
}
|
}
|
||||||
@@ -68,10 +67,13 @@ struct PostingTimelineSwitcherView: View {
|
|||||||
|
|
||||||
struct PostingTimelineSwitcherView_Previews: PreviewProvider {
|
struct PostingTimelineSwitcherView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
PostingTimelineSwitcherView(
|
VStack {
|
||||||
damusState: test_damus_state,
|
PostingTimelineSwitcherView(
|
||||||
timelineSource: .constant(.follows)
|
damusState: test_damus_state,
|
||||||
)
|
timelineSource: .constant(.follows)
|
||||||
|
)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ struct PostingTimelineView: View {
|
|||||||
HStack {}
|
HStack {}
|
||||||
.frame(height: getSafeAreaTop())
|
.frame(height: getSafeAreaTop())
|
||||||
|
|
||||||
HStack(alignment: .top) {
|
HStack(alignment: .center) {
|
||||||
TopbarSideMenuButton(damus_state: damus_state, isSideBarOpened: $isSideBarOpened)
|
TopbarSideMenuButton(damus_state: damus_state, isSideBarOpened: $isSideBarOpened)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
@@ -77,8 +77,12 @@ struct PostingTimelineView: View {
|
|||||||
timelineSource: $timeline_source
|
timelineSource: $timeline_source
|
||||||
)
|
)
|
||||||
if #available(iOS 17.0, *) {
|
if #available(iOS 17.0, *) {
|
||||||
|
Image(systemName: "square.stack")
|
||||||
|
.foregroundColor(DamusColors.purple)
|
||||||
|
.overlay(
|
||||||
switchView
|
switchView
|
||||||
.popoverTip(PostingTimelineSwitcherView.TimelineSwitcherTip.shared)
|
.popoverTip(PostingTimelineSwitcherView.TimelineSwitcherTip.shared)
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
switchView
|
switchView
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user