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,6 +57,7 @@ public struct RecordingView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GlassEffectContainer {
|
||||||
HStack(
|
HStack(
|
||||||
spacing: Constant.Spacing.stack
|
spacing: Constant.Spacing.stack
|
||||||
) {
|
) {
|
||||||
@@ -66,6 +68,9 @@ public struct RecordingView: View {
|
|||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
}
|
}
|
||||||
|
.buttonStyle(.recording(
|
||||||
|
invertStyle: true
|
||||||
|
))
|
||||||
.disabled(model.shouldDisableMain)
|
.disabled(model.shouldDisableMain)
|
||||||
|
|
||||||
if model.shouldShowSend {
|
if model.shouldShowSend {
|
||||||
@@ -79,12 +84,13 @@ public struct RecordingView: View {
|
|||||||
ProgressView()
|
ProgressView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.disabled(model.isProcessing)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.buttonStyle(.recording(
|
.buttonStyle(.recording(
|
||||||
invertStyle: !model.isProcessing
|
invertStyle: !model.isProcessing
|
||||||
))
|
))
|
||||||
|
.disabled(model.isProcessing)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.onChange(
|
.onChange(
|
||||||
of: model.state,
|
of: model.state,
|
||||||
|
|||||||
Reference in New Issue
Block a user