Skip to content

Commit

Permalink
reorder menubar
Browse files Browse the repository at this point in the history
  • Loading branch information
ego-lay-atman-bay committed Jul 11, 2024
1 parent eec2e6a commit 2518a62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,17 +2089,15 @@ def createMenubar(self):
self.file_menu.add_separator()
self.file_menu.add_command(label = 'Settings', command = self.showSettings)

self.menubar.add_cascade(label = 'File', menu = self.file_menu)


self.help_menu = tk.Menu(self.menubar, tearoff = 0)

self.help_menu.add_command(label = 'Discord', command = lambda *args : webbrowser.open(__links__['discord']))
self.help_menu.add_command(label = 'About', command = self.showAbout)
self.help_menu.add_command(label = 'Check for update', command = lambda *args : webbrowser.open(__links__['releases']))
self.help_menu.add_command(label = 'Bug report', command = lambda *args : webbrowser.open(__links__['bugs']))
self.help_menu.add_command(label = 'Open log', command = lambda *args : crossplatform.open_file(_log_filename))

self.menubar.add_cascade(label = 'Help', menu = self.help_menu)

self.view_menu: dict[
typing.Literal[
Expand Down Expand Up @@ -2147,7 +2145,9 @@ def createMenubar(self):
self.view_menu['vars']['path'].trace_add('write', lambda *args : self.updateView('path', self.view_menu['vars']['path'].get()))
self.view_menu['menu'].add_checkbutton(label = 'path', onvalue = True, offvalue = False, variable = self.view_menu['vars']['path'])

self.menubar.add_cascade(label = 'File', menu = self.file_menu)
self.menubar.add_cascade(label = 'View', menu = self.view_menu['menu'])
self.menubar.add_cascade(label = 'Help', menu = self.help_menu)

def updateView(self, view: str, state: bool = True):
self.settings.set(['view', view], state)
Expand Down

0 comments on commit 2518a62

Please sign in to comment.