Removing padding from SwiftUI list

It appears that swift ui lists are broken on the Mac for complicated lists. I can't seem to do the following:
  1. Remove the spacing between lists using either default or plain styles. I always seem to get what looks like separator but it is near drawn?

  2. Can't remove the padding without hard coding values. Insets seem to be broken.

  3. The default highlight for self sizing cells seem to not highlight properly.

To get around this I have moved to a LazyVStack but then you lose edit functionality of the list.

I can write a simple sample later. Any one had any luck with lists on the Mac beyond a simple text item?



Post not yet marked as solved Up vote post of venturabumm Down vote post of venturabumm
7.7k views

Replies

Hi,

Have you tested not using plain or default style, or is a requirement ?

For example:

Code Block
.listStyle(SidebarListStyle())

removes padding between list items for me.