Updated the new post button with gradient fill.
Changelog-Changed: Added damus gradient to post button Closes: #244
This commit is contained in:
committed by
William Casarin
parent
22008aeabc
commit
553dcb785c
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0x4D",
|
||||||
|
"red" : "0x4B"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xFF",
|
||||||
|
"green" : "0x4D",
|
||||||
|
"red" : "0x4B"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xC5",
|
||||||
|
"green" : "0x43",
|
||||||
|
"red" : "0xCC"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0xC5",
|
||||||
|
"green" : "0x43",
|
||||||
|
"red" : "0xCC"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,13 +8,20 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
|
let BUTTON_SIZE = 57.0
|
||||||
|
let LINEAR_GRADIENT = LinearGradient(gradient: Gradient(colors: [
|
||||||
|
Color("DamusPurple"),
|
||||||
|
Color("DamusBlue")
|
||||||
|
]), startPoint: .topTrailing, endPoint: .bottomTrailing)
|
||||||
|
|
||||||
|
|
||||||
func PostButton(action: @escaping () -> ()) -> some View {
|
func PostButton(action: @escaping () -> ()) -> some View {
|
||||||
return Button(action: action, label: {
|
return Button(action: action, label: {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
.font(.system(.title2))
|
.font(.system(.title2))
|
||||||
.foregroundColor(Color.white)
|
.foregroundColor(Color.white)
|
||||||
.frame(width: 57, height: 57, alignment: .center)
|
.frame(width: BUTTON_SIZE, height: BUTTON_SIZE, alignment: .center)
|
||||||
.background(Color.accentColor)
|
.background(LINEAR_GRADIENT)
|
||||||
.cornerRadius(38.5)
|
.cornerRadius(38.5)
|
||||||
.padding()
|
.padding()
|
||||||
.shadow(color: Color.black.opacity(0.3),
|
.shadow(color: Color.black.opacity(0.3),
|
||||||
|
|||||||
Reference in New Issue
Block a user