mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
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:
+6
-8
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user