ui/layout: replace "interface element" with "widget" in documentation

Now that we have a Widget type, use it in the documentation.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-09-22 16:19:07 +02:00
parent 4a1e0a30cb
commit 2d8072fbbb
+6 -8
View File
@@ -21,8 +21,7 @@ type Constraint struct {
Min, Max int Min, Max int
} }
// Dimensions are the resolved size and baseline for a user // Dimensions are the resolved size and baseline for a widget.
// interface element.
type Dimensions struct { type Dimensions struct {
Size image.Point Size image.Point
Baseline int Baseline int
@@ -31,12 +30,11 @@ type Dimensions struct {
// Axis is the Horizontal or Vertical direction. // Axis is the Horizontal or Vertical direction.
type Axis uint8 type Axis uint8
// Alignment is the relative alignment of a list of // Alignment is the mutual alignment of a list of widgets.
// interface elements.
type Alignment uint8 type Alignment uint8
// Direction is the alignment of a set of interface elements // Direction is the alignment of widgets relative to a containing
// relative to a containing space. // space.
type Direction uint8 type Direction uint8
// Widget is a function that computes a set of dimensions that // Widget is a function that computes a set of dimensions that
@@ -91,12 +89,12 @@ func RigidConstraints(size image.Point) Constraints {
} }
} }
// Inset adds space around an interface element. // Inset adds space around a widget.
type Inset struct { type Inset struct {
Top, Right, Bottom, Left ui.Value Top, Right, Bottom, Left ui.Value
} }
// Align aligns an interface element in the available space. // Align aligns a widget in the available space.
type Align struct { type Align struct {
Alignment Direction Alignment Direction
} }