Skip to content

Commit

Permalink
fix broken non-CI test
Browse files Browse the repository at this point in the history
This was broken with f8a2ae6 but went
unnoticed.
  • Loading branch information
toaster authored and andydotxyz committed Oct 25, 2020
1 parent 6553694 commit 1cd2903
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/driver/glfw/canvas.go
Expand Up @@ -444,7 +444,7 @@ func (c *glCanvas) setDirty(dirty bool) {
c.dirty = dirty
}

func (c *glCanvas) setMenuOverlay(b *MenuBar) {
func (c *glCanvas) setMenuOverlay(b fyne.CanvasObject) {
c.menu = b
c.menuTree = &renderCacheTree{root: &renderCacheNode{obj: c.menu}}
c.menuFocusMgr = app.NewFocusManager(c.menu)
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/glfw/driver_test.go
Expand Up @@ -56,7 +56,7 @@ func Test_gLDriver_AbsolutePositionForObject(t *testing.T) {
// 0 is the shadow
// 1 is the menu bar’s background
// 2 is the container holding the items
mbarCont := cache.Renderer(movl).Objects()[2].(*fyne.Container)
mbarCont := cache.Renderer(movl.(fyne.Widget)).Objects()[2].(*fyne.Container)
m2 := mbarCont.Objects[1]

tests := map[string]struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/glfw/menu.go
Expand Up @@ -4,7 +4,7 @@ import (
"fyne.io/fyne"
)

func buildMenuOverlay(menus *fyne.MainMenu, c fyne.Canvas) *MenuBar {
func buildMenuOverlay(menus *fyne.MainMenu, c fyne.Canvas) fyne.CanvasObject {
if len(menus.Items) == 0 {
fyne.LogError("Main menu must have at least one child menu", nil)
return nil
Expand Down

0 comments on commit 1cd2903

Please sign in to comment.