Closed typesupply closed 1 year ago
The edge insets are being ignored for items with their size (width for vertical stacks, height for horizontal stacks) set to "fill". Here's a test case:
import AppKit import vanilla def makeBox(color): box = vanilla.Box( (0, 0, 400, 100), fillColor=color, cornerRadius=10 ) return box class Test: def __init__(self): self.w = vanilla.Window( (500, 0) ) self.redBox = makeBox(AppKit.NSColor.redColor()) self.blueBox = makeBox(AppKit.NSColor.blueColor()) self.w.stack = vanilla.VerticalStackView( (0, 0, 0, 0), views=[ dict(view=self.redBox, width=400, height=100), dict(view=self.blueBox, width="fill", height=100) ], edgeInsets=(50, 50, 50, 50) ) self.w.open() from vanilla.test.testTools import executeVanillaTest executeVanillaTest(Test)
I think this is happening because constraints are added to the view that make it the same size as the stack size.
This should be closed with 3f2f311d123b9a3de82e3fa72943633e7e24891d.
The edge insets are being ignored for items with their size (width for vertical stacks, height for horizontal stacks) set to "fill". Here's a test case: