commit d0eb632ce62611258b1f09334a29964e338e1088
parent cd62418dda2c740cfc36d0d9db760dd48e830cc1
Author: Ben Weeks <ben.weeks@outlook.com>
Date: Thu, 5 Jan 2023 22:26:12 +0000
PostButton: Very minor tweak to make it look more natural
Closes: #259
Diffstat:
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/damus/Views/PostButton.swift b/damus/Views/PostButton.swift
@@ -14,20 +14,22 @@ let LINEAR_GRADIENT = LinearGradient(gradient: Gradient(colors: [
Color("DamusBlue")
]), startPoint: .topTrailing, endPoint: .bottomTrailing)
-
func PostButton(action: @escaping () -> ()) -> some View {
return Button(action: action, label: {
- Image(systemName: "plus")
- .font(.system(.title2))
- .foregroundColor(Color.white)
- .frame(width: BUTTON_SIZE, height: BUTTON_SIZE, alignment: .center)
- .background(LINEAR_GRADIENT)
- .cornerRadius(38.5)
- .padding()
- .shadow(color: Color.black.opacity(0.3),
- radius: 3,
- x: 3,
- y: 3)
+ ZStack(alignment: .center) {
+ Circle()
+ .fill(LINEAR_GRADIENT)
+ .frame(width: BUTTON_SIZE, height: BUTTON_SIZE, alignment: .center)
+ .rotationEffect(.degrees(20))
+ .padding()
+ .shadow(color: Color.black.opacity(0.3),
+ radius: 3,
+ x: 3,
+ y: 3)
+ Image(systemName: "plus")
+ .font(.system(.title2))
+ .foregroundColor(Color.white)
+ }
})
.keyboardShortcut("n", modifiers: [.command, .shift])
}