Removed leftover TODOs: container does handle margins now.
This commit is contained in:
parent
b3b91c68d0
commit
d307848c8c
|
@ -189,7 +189,6 @@ func (g *Grid) allocate(x int, y int, width int, height int, d *sysSizeData) (al
|
||||||
}
|
}
|
||||||
|
|
||||||
// filling and stretchy are ignored for preferred size calculation
|
// filling and stretchy are ignored for preferred size calculation
|
||||||
// We don't consider the margins here, but will need to in container if Window.SizeToFit() is ever made a thing. TODO
|
|
||||||
func (g *Grid) preferredSize(d *sysSizeData) (width int, height int) {
|
func (g *Grid) preferredSize(d *sysSizeData) (width int, height int) {
|
||||||
max := func(a int, b int) int {
|
max := func(a int, b int) int {
|
||||||
if a > b {
|
if a > b {
|
||||||
|
|
|
@ -137,7 +137,6 @@ func (s *Stack) allocate(x int, y int, width int, height int, d *sizing) (alloca
|
||||||
}
|
}
|
||||||
|
|
||||||
// The preferred size of a Stack is the sum of the preferred sizes of non-stretchy controls + (the number of stretchy controls * the largest preferred size among all stretchy controls).
|
// The preferred size of a Stack is the sum of the preferred sizes of non-stretchy controls + (the number of stretchy controls * the largest preferred size among all stretchy controls).
|
||||||
// We don't consider the margins here, but will need to in container if Window.SizeToFit() is ever made a thing. TODO
|
|
||||||
func (s *Stack) preferredSize(d *sizing) (width int, height int) {
|
func (s *Stack) preferredSize(d *sizing) (width int, height int) {
|
||||||
max := func(a int, b int) int {
|
max := func(a int, b int) int {
|
||||||
if a > b {
|
if a > b {
|
||||||
|
|
Loading…
Reference in New Issue