damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 553dcb785c226f0a00e5af343843eaedb9f9589c
parent 22008aeabc8bdfe6e136550092566c025fcedc2c
Author: Ben Weeks <ben.weeks@outlook.com>
Date:   Wed,  4 Jan 2023 17:01:23 +0000

Updated the new post button with gradient fill.

Changelog-Changed: Added damus gradient to post button
Closes: #244

Diffstat:
Adamus/Assets.xcassets/Colors/DamusBlue.colorset/Contents.json | 38++++++++++++++++++++++++++++++++++++++
Adamus/Assets.xcassets/Colors/DamusPurple.colorset/Contents.json | 38++++++++++++++++++++++++++++++++++++++
Mdamus/Views/PostButton.swift | 11+++++++++--
3 files changed, 85 insertions(+), 2 deletions(-)

diff --git a/damus/Assets.xcassets/Colors/DamusBlue.colorset/Contents.json b/damus/Assets.xcassets/Colors/DamusBlue.colorset/Contents.json @@ -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 + } +} diff --git a/damus/Assets.xcassets/Colors/DamusPurple.colorset/Contents.json b/damus/Assets.xcassets/Colors/DamusPurple.colorset/Contents.json @@ -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 + } +} diff --git a/damus/Views/PostButton.swift b/damus/Views/PostButton.swift @@ -8,13 +8,20 @@ import Foundation 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 { return Button(action: action, label: { Image(systemName: "plus") .font(.system(.title2)) .foregroundColor(Color.white) - .frame(width: 57, height: 57, alignment: .center) - .background(Color.accentColor) + .frame(width: BUTTON_SIZE, height: BUTTON_SIZE, alignment: .center) + .background(LINEAR_GRADIENT) .cornerRadius(38.5) .padding() .shadow(color: Color.black.opacity(0.3),