Improve EventActionBar button spacing

Changelog-Changed: Improved EventActionBar button spacing
Closes: #576
This commit is contained in:
Bryan Montz
2023-02-12 07:25:16 -06:00
committed by William Casarin
parent d547dade04
commit 94f66adf8d
2 changed files with 5 additions and 8 deletions

View File

@@ -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)
}

View File

@@ -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))
}
}