diff --git a/place.go b/place.go index 27fc9e4..00107b5 100644 --- a/place.go +++ b/place.go @@ -167,6 +167,14 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { return 0, 0 } +func (tk *guiWidget) isDense() bool { + if tk.node.InTable() { + return true + } + + return tk.isWindowDense() +} + func (tk *guiWidget) isWindowDense() bool { if tk.WidgetType() == widget.Window { return tk.window.dense @@ -193,8 +201,6 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) { return 0, 0 } - dense := w.isWindowDense() - w.full.w0 = startW w.full.h0 = startH @@ -209,7 +215,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) { if w.heights[child.GridH()] < childH { w.heights[child.GridH()] = childH } - if dense { + if child.isDense() { if w.heights[child.GridH()] > 0 { w.heights[child.GridH()] = 1 } else {