Adopted Liquid Glass effect for the buttons of the RecordingView view in the Recording package target.
This commit is contained in:
@@ -48,6 +48,7 @@ public struct RecordingView: View {
|
|||||||
Text(model.textTimer)
|
Text(model.textTimer)
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
|
.foregroundStyle(.primary)
|
||||||
.monospacedDigit()
|
.monospacedDigit()
|
||||||
.contentTransition(.numericText())
|
.contentTransition(.numericText())
|
||||||
.animation(
|
.animation(
|
||||||
@@ -56,35 +57,40 @@ public struct RecordingView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(
|
GlassEffectContainer {
|
||||||
spacing: Constant.Spacing.stack
|
HStack(
|
||||||
) {
|
spacing: Constant.Spacing.stack
|
||||||
Button {
|
) {
|
||||||
model.pressedMain()
|
|
||||||
} label: {
|
|
||||||
Image(model.iconMain)
|
|
||||||
.resizable()
|
|
||||||
.scaledToFit()
|
|
||||||
}
|
|
||||||
.disabled(model.shouldDisableMain)
|
|
||||||
|
|
||||||
if model.shouldShowSend {
|
|
||||||
Button {
|
Button {
|
||||||
model.pressedSend()
|
model.pressedMain()
|
||||||
} label: {
|
} label: {
|
||||||
if let icon = model.iconSend {
|
Image(model.iconMain)
|
||||||
Image(icon)
|
.resizable()
|
||||||
.resizable()
|
.scaledToFit()
|
||||||
} else {
|
}
|
||||||
ProgressView()
|
.buttonStyle(.recording(
|
||||||
|
invertStyle: true
|
||||||
|
))
|
||||||
|
.disabled(model.shouldDisableMain)
|
||||||
|
|
||||||
|
if model.shouldShowSend {
|
||||||
|
Button {
|
||||||
|
model.pressedSend()
|
||||||
|
} label: {
|
||||||
|
if let icon = model.iconSend {
|
||||||
|
Image(icon)
|
||||||
|
.resizable()
|
||||||
|
} else {
|
||||||
|
ProgressView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.buttonStyle(.recording(
|
||||||
|
invertStyle: !model.isProcessing
|
||||||
|
))
|
||||||
|
.disabled(model.isProcessing)
|
||||||
}
|
}
|
||||||
.disabled(model.isProcessing)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buttonStyle(.recording(
|
|
||||||
invertStyle: !model.isProcessing
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
.onChange(
|
.onChange(
|
||||||
of: model.state,
|
of: model.state,
|
||||||
|
|||||||
Reference in New Issue
Block a user