Skip to content

Commit

Permalink
Prevent showing button shapes on New Tab Page
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 committed Nov 18, 2024
1 parent d1c3a62 commit b63c22c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions DuckDuckGo/EditableShortcutsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct EditableShortcutsView: View {
ShortcutItemView(shortcut: setting.item, accessoryType: isEnabled ? .selected : .add)
.frame(width: NewTabPageGrid.Item.edgeSize)
}
.buttonStyle(.plain)
.padding([.horizontal, .top], 6) // Adjust for the accessory being cut-off when lifting for preview
.previewShape()
} preview: { setting in
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/FavoritesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ struct FavoritesView<Model: FavoritesViewModel>: View {
.background(.clear)
.frame(width: NewTabPageGrid.Item.edgeSize)
})
.buttonStyle(.plain)
case .addFavorite:
Button(action: {
isAddingFavorite = true
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/ShortcutsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct ShortcutsView: View {
} label: {
ShortcutItemView(shortcut: shortcut, accessoryType: nil)
}
.buttonStyle(.plain)
}
}
}
Expand Down

0 comments on commit b63c22c

Please sign in to comment.