Remove margin from layout interface
Layouts will need to store margin and padding values within themseleves.
This commit is contained in:
parent
2cac2b3bd0
commit
285cb4810f
@ -18,18 +18,17 @@ type Layout interface {
|
|||||||
// and changes the position of the entiries in the slice so that they
|
// 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
|
// are properly laid out. The given width and height should not be less
|
||||||
// than what is returned by MinimumSize.
|
// 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
|
// MinimumSize returns the minimum width and height that the layout
|
||||||
// needs to properly arrange the given slice of layout entries.
|
// 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
|
// FlexibleHeightFor Returns the minimum height the layout needs to lay
|
||||||
// out the specified elements at the given width, taking into account
|
// out the specified elements at the given width, taking into account
|
||||||
// flexible elements.
|
// flexible elements.
|
||||||
FlexibleHeightFor (
|
FlexibleHeightFor (
|
||||||
entries []LayoutEntry,
|
entries []LayoutEntry,
|
||||||
margin int,
|
|
||||||
squeeze int,
|
squeeze int,
|
||||||
) (
|
) (
|
||||||
height int,
|
height int,
|
||||||
|
Reference in New Issue
Block a user