Remove margin from layout interface

Layouts will need to store margin and padding values within
themseleves.
This commit is contained in:
Sasha Koshka 2023-03-02 16:48:37 -05:00
parent 2cac2b3bd0
commit 285cb4810f
1 changed files with 2 additions and 3 deletions

View File

@ -18,18 +18,17 @@ type Layout interface {
// and changes the position of the entiries in the slice so that they
// are properly laid out. The given width and height should not be less
// than what is returned by MinimumSize.
Arrange (entries []LayoutEntry, margin int, bounds image.Rectangle)
Arrange (entries []LayoutEntry, bounds image.Rectangle)
// MinimumSize returns the minimum width and height that the layout
// needs to properly arrange the given slice of layout entries.
MinimumSize (entries []LayoutEntry, margin int) (width, height int)
MinimumSize (entries []LayoutEntry) (width, height int)
// FlexibleHeightFor Returns the minimum height the layout needs to lay
// out the specified elements at the given width, taking into account
// flexible elements.
FlexibleHeightFor (
entries []LayoutEntry,
margin int,
squeeze int,
) (
height int,