ui(ios): glassy settings button
This commit is contained in:
@@ -14,8 +14,28 @@ struct RootCanvas: View {
|
|||||||
.font(.system(size: 16, weight: .semibold))
|
.font(.system(size: 16, weight: .semibold))
|
||||||
.foregroundStyle(.primary)
|
.foregroundStyle(.primary)
|
||||||
.padding(10)
|
.padding(10)
|
||||||
.background(.thinMaterial)
|
.background {
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
|
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||||
|
.fill(.ultraThinMaterial)
|
||||||
|
.overlay {
|
||||||
|
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||||
|
.fill(
|
||||||
|
LinearGradient(
|
||||||
|
colors: [
|
||||||
|
.white.opacity(0.18),
|
||||||
|
.white.opacity(0.04),
|
||||||
|
.clear,
|
||||||
|
],
|
||||||
|
startPoint: .topLeading,
|
||||||
|
endPoint: .bottomTrailing))
|
||||||
|
.blendMode(.overlay)
|
||||||
|
}
|
||||||
|
.overlay {
|
||||||
|
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||||
|
.strokeBorder(.white.opacity(0.18), lineWidth: 0.5)
|
||||||
|
}
|
||||||
|
.shadow(color: .black.opacity(0.35), radius: 12, y: 6)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.padding(.top, 10)
|
.padding(.top, 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user