Skip to content

Commit

Permalink
Fix issue where menu did not layout always
Browse files Browse the repository at this point in the history
Fixes #1973
  • Loading branch information
andydotxyz committed Feb 20, 2021
1 parent b2e10e9 commit 88ec525
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/driver/glfw/canvas.go
Expand Up @@ -477,6 +477,14 @@ func (c *glCanvas) setMenuOverlay(b fyne.CanvasObject) {
c.menu = b
c.menuTree = &renderCacheTree{root: &renderCacheNode{obj: c.menu}}
c.menuFocusMgr = app.NewFocusManager(c.menu)

if c.menu != nil && !c.size.IsZero() {
c.content.Resize(c.contentSize(c.size))
c.content.Move(c.contentPos())

c.menu.Refresh()
c.menu.Resize(fyne.NewSize(c.size.Width, c.menu.MinSize().Height))
}
}

func (c *glCanvas) setupThemeListener() {
Expand Down

0 comments on commit 88ec525

Please sign in to comment.