always make protobuf tables dense

This commit is contained in:
Jeff Carr 2025-03-25 11:31:16 -05:00
parent aaebb4c5d9
commit bf250b5ac6
1 changed files with 9 additions and 3 deletions

View File

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