mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
layout: expand Stack documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-4
@@ -26,16 +26,17 @@ type StackChild struct {
|
|||||||
dims Dimensions
|
dims Dimensions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stacked returns a Stack child that laid out with the same maximum
|
// Stacked returns a Stack child that is laid out with no minimum
|
||||||
// constraints as the Stack.
|
// constraints and the maximum constraints passed to Stack.Layout.
|
||||||
func Stacked(w Widget) StackChild {
|
func Stacked(w Widget) StackChild {
|
||||||
return StackChild{
|
return StackChild{
|
||||||
widget: w,
|
widget: w,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expanded returns a Stack child that is forced to take up at least
|
// Expanded returns a Stack child with the minimum constraints set
|
||||||
// the space as the largest Stacked.
|
// to the largest Stacked child. The maximum constraints are set to
|
||||||
|
// the same as passed to Stack.Layout.
|
||||||
func Expanded(w Widget) StackChild {
|
func Expanded(w Widget) StackChild {
|
||||||
return StackChild{
|
return StackChild{
|
||||||
expanded: true,
|
expanded: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user