macOS client parity review
This commit is contained in:
@@ -226,7 +226,7 @@ struct Thumbnails: View {
|
||||
Button("×") {
|
||||
drafts.remove(key, img.id)
|
||||
}
|
||||
.buttonStyle(WebButtonStyle())
|
||||
.buttonStyle(ThumbRemoveStyle())
|
||||
.help("Remove image")
|
||||
.offset(x: 6, y: -6)
|
||||
}
|
||||
@@ -237,6 +237,30 @@ struct Thumbnails: View {
|
||||
}
|
||||
}
|
||||
|
||||
private struct ThumbRemoveStyle: ButtonStyle {
|
||||
func makeBody(configuration: ButtonStyleConfiguration) -> some View {
|
||||
ThumbRemove(configuration: configuration)
|
||||
}
|
||||
}
|
||||
|
||||
private struct ThumbRemove: View {
|
||||
let configuration: ButtonStyleConfiguration
|
||||
@ViewState private var hover = false
|
||||
|
||||
var body: some View {
|
||||
configuration.label
|
||||
.font(Fonts.font(13))
|
||||
.foregroundStyle(Palette.text)
|
||||
.padding(.horizontal, 6)
|
||||
.frame(height: 18)
|
||||
.padding(1)
|
||||
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 9))
|
||||
.overlay(RoundedRectangle(cornerRadius: 9).strokeBorder(hover ? Palette.muted : Palette.border))
|
||||
.contentShape(RoundedRectangle(cornerRadius: 9))
|
||||
.onHover { hover = $0 }
|
||||
}
|
||||
}
|
||||
|
||||
struct ComposerView: View {
|
||||
let chat: ChatModel
|
||||
let key: String
|
||||
|
||||
Reference in New Issue
Block a user