From 18d4dbf60c4ff644fe976b9e4f1be27229848529 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Sun, 20 Dec 2020 00:33:50 -0500 Subject: [PATCH] layout: document how Inset modifies constraints Signed-off-by: Chris Waldon --- layout/layout.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/layout.go b/layout/layout.go index 57e835af..d3b7a742 100644 --- a/layout/layout.go +++ b/layout/layout.go @@ -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 }