closer to accurate grid sizes
This commit is contained in:
parent
176831d0f3
commit
e39bcafb78
3
place.go
3
place.go
|
@ -71,6 +71,9 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
||||||
if me.treeRoot == nil {
|
if me.treeRoot == nil {
|
||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
|
if tk.Hidden() {
|
||||||
|
return 0, 0
|
||||||
|
}
|
||||||
|
|
||||||
tk.startW = startW
|
tk.startW = startW
|
||||||
tk.startH = startH
|
tk.startH = startH
|
||||||
|
|
2
size.go
2
size.go
|
@ -98,8 +98,6 @@ func (w *guiWidget) sizeGrid() (int, int) {
|
||||||
}
|
}
|
||||||
sizeW, sizeH := child.Size()
|
sizeW, sizeH := child.Size()
|
||||||
|
|
||||||
sizeW += 2
|
|
||||||
|
|
||||||
// set the child's realWidth, and grid offset
|
// set the child's realWidth, and grid offset
|
||||||
if w.widths[child.node.State.AtW] < sizeW {
|
if w.widths[child.node.State.AtW] < sizeW {
|
||||||
w.widths[child.node.State.AtW] = sizeW
|
w.widths[child.node.State.AtW] = sizeW
|
||||||
|
|
Loading…
Reference in New Issue