layout: document how Inset modifies constraints

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2020-12-20 00:33:50 -05:00
committed by Elias Naur
parent 00c4a53036
commit 18d4dbf60c
+3 -1
View File
@@ -109,7 +109,9 @@ func (c Constraints) Constrain(size image.Point) image.Point {
return size
}
// Inset adds space around a widget.
// Inset adds space around a widget by decreasing its maximum
// constraints. The minimum constraints will be adjusted to ensure
// they do not exceed the maximum.
type Inset struct {
Top, Right, Bottom, Left unit.Value
}