mirror of https://github.com/mum4k/termdash.git
Better documentation for Grid.
Noting restriction of max height/width and what happens if all widths / heights are less than 100%.
This commit is contained in:
parent
c0a069c153
commit
ab013dd021
|
@ -232,7 +232,9 @@ func (w *widget) String() string {
|
||||||
func (widget) isElement() {}
|
func (widget) isElement() {}
|
||||||
|
|
||||||
// RowHeightPerc creates a row of the specified height.
|
// RowHeightPerc creates a row of the specified height.
|
||||||
// The height is supplied as height percentage of the outer container.
|
// The height is supplied as height percentage of the parent element.
|
||||||
|
// The sum of all heights at the same level cannot be larger than 100%. If it
|
||||||
|
// is less that 100%, the last element stretches to the edge of the screen.
|
||||||
// The subElements can be either a single Widget or any combination of Rows and
|
// The subElements can be either a single Widget or any combination of Rows and
|
||||||
// Columns.
|
// Columns.
|
||||||
func RowHeightPerc(heightPerc int, subElements ...Element) Element {
|
func RowHeightPerc(heightPerc int, subElements ...Element) Element {
|
||||||
|
@ -243,7 +245,9 @@ func RowHeightPerc(heightPerc int, subElements ...Element) Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ColWidthPerc creates a column of the specified width.
|
// ColWidthPerc creates a column of the specified width.
|
||||||
// The width is supplied as width percentage of the outer container.
|
// The width is supplied as width percentage of the parent element.
|
||||||
|
// The sum of all widths at the same level cannot be larger than 100%. If it
|
||||||
|
// is less that 100%, the last element stretches to the edge of the screen.
|
||||||
// The subElements can be either a single Widget or any combination of Rows and
|
// The subElements can be either a single Widget or any combination of Rows and
|
||||||
// Columns.
|
// Columns.
|
||||||
func ColWidthPerc(widthPerc int, subElements ...Element) Element {
|
func ColWidthPerc(widthPerc int, subElements ...Element) Element {
|
||||||
|
|
Loading…
Reference in New Issue