Reshuffle the position of the action buttons on the RecordingView view in the Recording package target.
This commit is contained in:
@@ -136,7 +136,7 @@ private enum Constant {
|
|||||||
/// The padding constants.
|
/// The padding constants.
|
||||||
enum Padding {
|
enum Padding {
|
||||||
/// The base padding between a button's label and its background, before dynamic type scaling.
|
/// The base padding between a button's label and its background, before dynamic type scaling.
|
||||||
static let button: CGFloat = 8
|
static let button: CGFloat = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The size constants.
|
/// The size constants.
|
||||||
|
|||||||
@@ -80,6 +80,19 @@ public struct RecordingView: View {
|
|||||||
HStack(
|
HStack(
|
||||||
spacing: Constant.Spacing.stack
|
spacing: Constant.Spacing.stack
|
||||||
) {
|
) {
|
||||||
|
if model.shouldShowActions {
|
||||||
|
Button {
|
||||||
|
model.pressedDiscard()
|
||||||
|
} label: {
|
||||||
|
Image.Icon.discard
|
||||||
|
.resizable()
|
||||||
|
}
|
||||||
|
.buttonStyle(.recording(
|
||||||
|
invertStyle: true
|
||||||
|
))
|
||||||
|
.accessibilityLabel(.viewRecordingButtonDiscardLabel)
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
model.pressedMain()
|
model.pressedMain()
|
||||||
} label: {
|
} label: {
|
||||||
@@ -108,17 +121,6 @@ public struct RecordingView: View {
|
|||||||
))
|
))
|
||||||
.disabled(model.isProcessing)
|
.disabled(model.isProcessing)
|
||||||
.accessibilityLabel(model.labelSend)
|
.accessibilityLabel(model.labelSend)
|
||||||
|
|
||||||
Button {
|
|
||||||
model.pressedDiscard()
|
|
||||||
} label: {
|
|
||||||
Image.Icon.discard
|
|
||||||
.resizable()
|
|
||||||
}
|
|
||||||
.buttonStyle(.recording(
|
|
||||||
invertStyle: true
|
|
||||||
))
|
|
||||||
.accessibilityLabel(.viewRecordingButtonDiscardLabel)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user