From ed7a618a57204c0bab6ef9d45ee7f0d471a7c7ef Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 15 Jan 2026 03:05:43 -0500 Subject: [PATCH] Avoid content size guard to fix fullscreen menu layout --- main.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index ffd8d43..4b95d62 100644 --- a/main.go +++ b/main.go @@ -1862,19 +1862,16 @@ func (s *appState) setContent(body fyne.CanvasObject) { update := func() { currentSize := s.window.Canvas().Size() bg := canvas.NewRectangle(backgroundColor) - sizeGuard := canvas.NewRectangle(color.Transparent) - if currentSize.Width > 0 && currentSize.Height > 0 { - sizeGuard.SetMinSize(currentSize) - } else { - sizeGuard.SetMinSize(fyne.NewSize(800, 600)) - } if body == nil { - s.window.SetContent(container.NewMax(bg, sizeGuard)) + s.window.SetContent(bg) return } // Wrap content with mouse button handler - wrapped := newMouseButtonHandler(container.NewMax(bg, sizeGuard, body), s) + wrapped := newMouseButtonHandler(container.NewMax(bg, body), s) s.window.SetContent(wrapped) + if currentSize.Width > 0 && currentSize.Height > 0 { + wrapped.Resize(currentSize) + } } // Use async Do() instead of DoAndWait() to avoid deadlock when called from main goroutine