Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions phoenix-ios/phoenix-ios/views/send/SendView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct SendView: View {

@Environment(\.colorScheme) var colorScheme: ColorScheme
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
@Environment(\.dynamicTypeSize) var dynamicTypeSize: DynamicTypeSize

@EnvironmentObject var navCoordinator: NavigationCoordinator
@EnvironmentObject var popoverState: PopoverState
Expand Down Expand Up @@ -236,11 +237,17 @@ struct SendView: View {

@ViewBuilder
func footer() -> some View {

ViewThatFits {
footer_standard()
footer_compact()
footer_accessibility()

Group {
if dynamicTypeSize.isAccessibilitySize {
footer_scrollable()
} else {
ViewThatFits {
footer_standard()
footer_compact()
footer_accessibility()
}
}
}
.assignMaxPreference(for: maxButtonWidthReader.key, to: $maxButtonWidth)
.background(
Expand All @@ -249,6 +256,30 @@ struct SendView: View {
.edgesIgnoringSafeArea([.horizontal, .bottom])
)
}

@ViewBuilder
func footer_scrollable() -> some View {

ScrollView(.horizontal, showsIndicators: false) {
HStack(alignment: VerticalAlignment.top, spacing: 20) {
roundButton_paste()
.frame(width: maxButtonWidth)
.read(maxButtonWidthReader)
roundButton_chooseImage()
.frame(width: maxButtonWidth)
.read(maxButtonWidthReader)
roundButton_nfc()
.frame(width: maxButtonWidth)
.read(maxButtonWidthReader)
roundButton_scanQrCode()
.frame(width: maxButtonWidth)
.read(maxButtonWidthReader)
}
.padding(.horizontal, 20)
}
.padding(.top, 20)
.padding(.bottom, deviceInfo.isFaceID ? 10 : 20)
}

@ViewBuilder
func footer_standard() -> some View {
Expand Down