diff --git a/backends/x/window.go b/backends/x/window.go index f1921da..0602007 100644 --- a/backends/x/window.go +++ b/backends/x/window.go @@ -205,7 +205,7 @@ func (window *Window) resizeChildToFit () { window.skipChildDrawCallback = true if child, ok := window.child.(tomo.Flexible); ok { minimumHeight := child.MinimumHeightFor(window.metrics.width) - _, minimumWidth := child.MinimumSize() + minimumWidth, _ := child.MinimumSize() icccm.WmNormalHintsSet ( @@ -254,6 +254,7 @@ func (window *Window) childDrawCallback (region tomo.Canvas) { } func (window *Window) childMinimumSizeChangeCallback (width, height int) { + println("x thinks:",width, height) icccm.WmNormalHintsSet ( window.backend.connection, window.xWindow.Id, diff --git a/layouts/vertical.go b/layouts/vertical.go index 84c05fd..46614da 100644 --- a/layouts/vertical.go +++ b/layouts/vertical.go @@ -99,6 +99,7 @@ func (layout Vertical) MinimumSize ( width += theme.Padding() * 2 height += theme.Padding() * 2 } + println(width, height) return } @@ -112,6 +113,7 @@ func (layout Vertical) MinimumHeightFor ( ) { if layout.Pad { width -= theme.Padding() * 2 + height += theme.Padding() * 2 } for index, entry := range entries { @@ -127,9 +129,5 @@ func (layout Vertical) MinimumHeightFor ( height += theme.Padding() } } - - if layout.Pad { - height += theme.Padding() * 2 - } return }