pygui: added menu buttons to add/delete canvases
This commit is contained in:
parent
4363a20ffb
commit
6f43d0e88f
3 changed files with 58 additions and 27 deletions
|
@ -128,6 +128,8 @@ class Menubar(tk.Menu):
|
|||
Create canvas menu
|
||||
"""
|
||||
menu = tk.Menu(self)
|
||||
menu.add_command(label="New", command=self.click_canvas_add)
|
||||
menu.add_command(label="Delete", command=self.click_canvas_delete)
|
||||
menu.add_command(label="Size / Scale", command=self.click_canvas_size_and_scale)
|
||||
menu.add_command(label="Wallpaper", command=self.click_canvas_wallpaper)
|
||||
self.add_cascade(label="Canvas", menu=menu)
|
||||
|
@ -372,6 +374,12 @@ class Menubar(tk.Menu):
|
|||
dialog = PreferencesDialog(self.app)
|
||||
dialog.show()
|
||||
|
||||
def click_canvas_add(self) -> None:
|
||||
self.canvas_manager.add_canvas()
|
||||
|
||||
def click_canvas_delete(self) -> None:
|
||||
self.canvas_manager.delete_canvas()
|
||||
|
||||
def click_canvas_size_and_scale(self) -> None:
|
||||
dialog = SizeAndScaleDialog(self.app)
|
||||
dialog.show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue