diff --git a/mac/Sources/Byre/Format.swift b/mac/Sources/Byre/Format.swift index b486a02..5a837c3 100644 --- a/mac/Sources/Byre/Format.swift +++ b/mac/Sources/Byre/Format.swift @@ -435,16 +435,21 @@ private struct WebButton: View { var body: some View { let fill = danger ? Palette.danger : Palette.accent - configuration.label - .font(Fonts.font(13, weight: primary ? 700 : 400)) - .foregroundStyle(primary ? Palette.bg : danger ? Palette.danger : Palette.text) - .padding(.horizontal, 12) - .padding(.vertical, touchOnly ? 7 : 4) - .background(primary ? fill : Palette.raised, in: RoundedRectangle(cornerRadius: 6)) - .overlay(RoundedRectangle(cornerRadius: 6).stroke(primary ? fill : hover && enabled ? Palette.muted : Palette.border)) - .opacity(enabled ? (configuration.isPressed ? 0.8 : 1) : 0.45) - .contentShape(Rectangle()) - .onHover { hover = $0 } + ZStack { + configuration.label + .font(Fonts.font(13, weight: 700)) + .hidden() + configuration.label + .font(Fonts.font(13, weight: primary ? 700 : 400)) + } + .foregroundStyle(primary ? Palette.bg : danger ? Palette.danger : Palette.text) + .padding(.horizontal, 12) + .padding(.vertical, touchOnly ? 7 : 4) + .background(primary ? fill : Palette.raised, in: RoundedRectangle(cornerRadius: 6)) + .overlay(RoundedRectangle(cornerRadius: 6).stroke(primary ? fill : hover && enabled ? Palette.muted : Palette.border)) + .opacity(enabled ? (configuration.isPressed ? 0.8 : 1) : 0.45) + .contentShape(Rectangle()) + .onHover { hover = $0 } } }