3

Using edgeInsets on NSStackView is ignored by Interface Builder and when running the app.

NSStackView edgeInsets not working

catlan
  • 25,100
  • 8
  • 67
  • 78

1 Answers1

7

NSStackView default hugging priority is 250. The edgeInsets is only enforced when the hugging priority is 500 or higher.

NSStackView edgeInsets hugging priority

Important: NSStackView has a hugging priority and a content hugging priority which are not the same.

NSStackView hugging priority and a content hugging priority

catlan
  • 25,100
  • 8
  • 67
  • 78
  • 1
    Is it just me or is the logic backwards here? I mean, you tell it to hug it's contents _more_, by upping the value from 250 to 500, and then it hugs them _less_, by respecting the edge insets. Weird, right? I'm also seeing something odd where I set only the bottom edge inset, but it uses that value for the top too. I may need to ask another question about that. – Rob N Feb 05 '22 at 14:40