Improve EventActionBar button spacing
Changelog-Changed: Improved EventActionBar button spacing Closes: #576
This commit is contained in:
committed by
William Casarin
parent
d547dade04
commit
94f66adf8d
@@ -100,7 +100,7 @@ struct ZapButton: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
HStack(spacing: 4) {
|
||||||
EventActionButton(img: zap_img, col: zap_color) {
|
EventActionButton(img: zap_img, col: zap_color) {
|
||||||
if bar.zapped {
|
if bar.zapped {
|
||||||
//notify(.delete, bar.our_tip)
|
//notify(.delete, bar.our_tip)
|
||||||
@@ -111,7 +111,6 @@ struct ZapButton: View {
|
|||||||
.accessibilityLabel(NSLocalizedString("Zap", comment: "Accessibility label for zap button"))
|
.accessibilityLabel(NSLocalizedString("Zap", comment: "Accessibility label for zap button"))
|
||||||
|
|
||||||
Text(String("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")"))
|
Text(String("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")"))
|
||||||
.offset(x: 22)
|
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
.foregroundColor(bar.zapped ? Color.orange : Color.gray)
|
.foregroundColor(bar.zapped ? Color.orange : Color.gray)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ struct EventActionBar: View {
|
|||||||
.accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button"))
|
.accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button"))
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
ZStack {
|
HStack(spacing: 4) {
|
||||||
|
|
||||||
EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) {
|
EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) {
|
||||||
if bar.boosted {
|
if bar.boosted {
|
||||||
@@ -62,13 +62,12 @@ struct EventActionBar: View {
|
|||||||
}
|
}
|
||||||
.accessibilityLabel(NSLocalizedString("Boosts", comment: "Accessibility label for boosts button"))
|
.accessibilityLabel(NSLocalizedString("Boosts", comment: "Accessibility label for boosts button"))
|
||||||
Text(verbatim: "\(bar.boosts > 0 ? "\(bar.boosts)" : "")")
|
Text(verbatim: "\(bar.boosts > 0 ? "\(bar.boosts)" : "")")
|
||||||
.offset(x: 18)
|
|
||||||
.font(.footnote.weight(.medium))
|
.font(.footnote.weight(.medium))
|
||||||
.foregroundColor(bar.boosted ? Color.green : Color.gray)
|
.foregroundColor(bar.boosted ? Color.green : Color.gray)
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
ZStack {
|
HStack(spacing: 4) {
|
||||||
LikeButton(liked: bar.liked) {
|
LikeButton(liked: bar.liked) {
|
||||||
if bar.liked {
|
if bar.liked {
|
||||||
notify(.delete, bar.our_like)
|
notify(.delete, bar.our_like)
|
||||||
@@ -77,7 +76,6 @@ struct EventActionBar: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text(verbatim: "\(bar.likes > 0 ? "\(bar.likes)" : "")")
|
Text(verbatim: "\(bar.likes > 0 ? "\(bar.likes)" : "")")
|
||||||
.offset(x: 22)
|
|
||||||
.font(.footnote.weight(.medium))
|
.font(.footnote.weight(.medium))
|
||||||
.foregroundColor(bar.liked ? Color.accentColor : Color.gray)
|
.foregroundColor(bar.liked ? Color.accentColor : Color.gray)
|
||||||
|
|
||||||
@@ -158,9 +156,9 @@ struct EventActionBar: View {
|
|||||||
|
|
||||||
func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View {
|
func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View {
|
||||||
Button(action: action) {
|
Button(action: action) {
|
||||||
Label(String("\u{00A0}"), systemImage: img)
|
Image(systemName: img)
|
||||||
.font(.footnote.weight(.medium))
|
|
||||||
.foregroundColor(col == nil ? Color.gray : col!)
|
.foregroundColor(col == nil ? Color.gray : col!)
|
||||||
|
.font(.footnote.weight(.medium))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user