Keep diagram buttons the same size when selected
This commit is contained in:
@@ -435,8 +435,13 @@ private struct WebButton: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
let fill = danger ? Palette.danger : Palette.accent
|
let fill = danger ? Palette.danger : Palette.accent
|
||||||
|
ZStack {
|
||||||
|
configuration.label
|
||||||
|
.font(Fonts.font(13, weight: 700))
|
||||||
|
.hidden()
|
||||||
configuration.label
|
configuration.label
|
||||||
.font(Fonts.font(13, weight: primary ? 700 : 400))
|
.font(Fonts.font(13, weight: primary ? 700 : 400))
|
||||||
|
}
|
||||||
.foregroundStyle(primary ? Palette.bg : danger ? Palette.danger : Palette.text)
|
.foregroundStyle(primary ? Palette.bg : danger ? Palette.danger : Palette.text)
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.padding(.vertical, touchOnly ? 7 : 4)
|
.padding(.vertical, touchOnly ? 7 : 4)
|
||||||
|
|||||||
Reference in New Issue
Block a user