damus

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

commit 94f66adf8d5c2908b3e3632f0eb7da46a9f8cbc9
parent d547dade04f528ab51bf6cc1a0ef3cbf0e719c28
Author: Bryan Montz <bryan.montz@lifechurch.tv>
Date:   Sun, 12 Feb 2023 07:25:16 -0600

Improve EventActionBar button spacing

Changelog-Changed: Improved EventActionBar button spacing
Closes: #576

Diffstat:
Mdamus/Components/ZapButton.swift | 3+--
Mdamus/Views/ActionBar/EventActionBar.swift | 10++++------
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/damus/Components/ZapButton.swift b/damus/Components/ZapButton.swift @@ -100,7 +100,7 @@ struct ZapButton: View { } var body: some View { - ZStack { + HStack(spacing: 4) { EventActionButton(img: zap_img, col: zap_color) { if bar.zapped { //notify(.delete, bar.our_tip) @@ -111,7 +111,6 @@ struct ZapButton: View { .accessibilityLabel(NSLocalizedString("Zap", comment: "Accessibility label for zap button")) Text(String("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")")) - .offset(x: 22) .font(.footnote) .foregroundColor(bar.zapped ? Color.orange : Color.gray) } diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift @@ -51,7 +51,7 @@ struct EventActionBar: View { .accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button")) } Spacer() - ZStack { + HStack(spacing: 4) { EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) { if bar.boosted { @@ -62,13 +62,12 @@ struct EventActionBar: View { } .accessibilityLabel(NSLocalizedString("Boosts", comment: "Accessibility label for boosts button")) Text(verbatim: "\(bar.boosts > 0 ? "\(bar.boosts)" : "")") - .offset(x: 18) .font(.footnote.weight(.medium)) .foregroundColor(bar.boosted ? Color.green : Color.gray) } Spacer() - ZStack { + HStack(spacing: 4) { LikeButton(liked: bar.liked) { if bar.liked { notify(.delete, bar.our_like) @@ -77,7 +76,6 @@ struct EventActionBar: View { } } Text(verbatim: "\(bar.likes > 0 ? "\(bar.likes)" : "")") - .offset(x: 22) .font(.footnote.weight(.medium)) .foregroundColor(bar.liked ? Color.accentColor : Color.gray) @@ -158,9 +156,9 @@ struct EventActionBar: View { func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View { Button(action: action) { - Label(String("\u{00A0}"), systemImage: img) - .font(.footnote.weight(.medium)) + Image(systemName: img) .foregroundColor(col == nil ? Color.gray : col!) + .font(.footnote.weight(.medium)) } }