damus

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

commit 174f7f6cc51c8b5cdcb88850326db5330226fa10
parent a325a3c064fb9e7de51b6ba20da9b89a58201445
Author: Joel Klabo <joelklabo@gmail.com>
Date:   Tue, 28 Feb 2023 18:52:29 -0800

Update Width of Copy Pubkey Background

Changelog-Fixed: Fixed width of copy pubkey on profile page
Closes: #714

Diffstat:
Mdamus/Views/ProfileView.swift | 39+++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift @@ -515,26 +515,25 @@ struct KeyView: View { let bech32 = bech32_pubkey(pubkey) ?? pubkey HStack { - RoundedRectangle(cornerRadius: 11) - .frame(height: 22) - .foregroundColor(fillColor()) - .overlay( - HStack { - Button { - copyPubkey(bech32) - } label: { - Label(NSLocalizedString("Public Key", comment: "Label indicating that the text is a user's public account key."), systemImage: "key.fill") - .font(.custom("key", size: 12.0)) - .labelStyle(IconOnlyLabelStyle()) - .foregroundStyle(hex_to_rgb(pubkey)) - .symbolRenderingMode(.palette) - } - .padding(.leading,4) - Text(verbatim: "\(abbrev_pubkey(bech32, amount: 16))") - .font(.footnote) - .foregroundColor(keyColor()) - } - ) + HStack { + Button { + copyPubkey(bech32) + } label: { + Label(NSLocalizedString("Public Key", comment: "Label indicating that the text is a user's public account key."), systemImage: "key.fill") + .font(.custom("key", size: 12.0)) + .labelStyle(IconOnlyLabelStyle()) + .foregroundStyle(hex_to_rgb(pubkey)) + .symbolRenderingMode(.palette) + } + .padding(.trailing, 2) + Text(verbatim: "\(abbrev_pubkey(bech32, amount: 16))") + .font(.footnote) + .foregroundColor(keyColor()) + } + .padding(2) + .padding([.leading, .trailing], 3) + .background(RoundedRectangle(cornerRadius: 11).foregroundColor(fillColor())) + if isCopied != true { Button { copyPubkey(bech32)