review button highlight
This commit is contained in:
@@ -1185,7 +1185,6 @@ private struct SnapshotRow: View {
|
||||
let taskId: String?
|
||||
@Environment(Store.self) private var store
|
||||
@Environment(Overlays.self) private var overlays
|
||||
@Environment(\.paneAccent) private var accent
|
||||
@ViewState private var forking = false
|
||||
|
||||
var body: some View {
|
||||
@@ -1261,7 +1260,7 @@ private struct SnapshotRow: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonStyle(SmallLinkButtonStyle(color: n > 0 ? Palette.warn : Palette.accent, border: review?.state == .running ? accent : Palette.border))
|
||||
.buttonStyle(SmallLinkButtonStyle(color: n > 0 ? Palette.warn : Palette.accent, fill: review?.state == .running ? Palette.accentTint : .clear))
|
||||
.help(review?.state == .running ? "Review in progress; show snapshot \(snap.n)'s review in the Reviews tab" : "Show the review of snapshot \(snap.n) in the Reviews tab")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,6 +402,7 @@ private struct WebButton: View {
|
||||
struct SmallLinkButtonStyle: ButtonStyle {
|
||||
var color = Palette.accent
|
||||
var border = Palette.border
|
||||
var fill = Color.clear
|
||||
@Environment(\.isEnabled) private var enabled
|
||||
|
||||
func makeBody(configuration: ButtonStyleConfiguration) -> some View {
|
||||
@@ -409,6 +410,7 @@ struct SmallLinkButtonStyle: ButtonStyle {
|
||||
.font(Fonts.font(11))
|
||||
.foregroundStyle(color)
|
||||
.padding(.horizontal, 6)
|
||||
.background(fill, in: RoundedRectangle(cornerRadius: 4))
|
||||
.overlay(RoundedRectangle(cornerRadius: 4).stroke(border))
|
||||
.opacity(enabled ? 1 : 0.45)
|
||||
.contentShape(Rectangle())
|
||||
|
||||
Reference in New Issue
Block a user