Skip to content

Commit

Permalink
Merge pull request #1 from TheBrainDunne/FullScreen-Toggle-MenuItem
Browse files Browse the repository at this point in the history
Update menus.go
  • Loading branch information
TheBrainDunne authored Sep 4, 2022
2 parents 05a882f + af3ce47 commit d789cfe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions menus.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func (d *defyne) menuActionSave() {
}
}

func (d *defyne) menuActionFullScreenToggle(){
d.win.SetFullScreen(!d.win.FullScreen())
}

func (d *defyne) makeMenu() *fyne.MainMenu {
return fyne.NewMainMenu(
fyne.NewMenu("File",
Expand All @@ -93,6 +97,9 @@ func (d *defyne) makeMenu() *fyne.MainMenu {
fyne.NewMenuItem("Run", d.menuActionRun),
fyne.NewMenuItem("Run Project", d.menuActionRunProject),
),
fyne.NewMenu("Window",
fyne.NewMenuItem("Full Screen", d.menuActionFullScreenToggle),
),
fyne.NewMenu("Help",
fyne.NewMenuItem("Documentation", func() {
u, _ := url.Parse("https://fyne.io/defyne")
Expand Down

0 comments on commit d789cfe

Please sign in to comment.