start implementing edit_recipe
This commit is contained in:
@@ -2,13 +2,13 @@ from tkinter import Frame, ttk
|
||||
from PIL import ImageDraw
|
||||
|
||||
from .base import View
|
||||
from .draw_utils import draw_clock, draw_long_press
|
||||
from .button_interface import ButtonInterface
|
||||
from .draw_utils import draw_long_press
|
||||
|
||||
class ButtonsManager(View):
|
||||
|
||||
def __init__(self, parent, im_size, center,
|
||||
**actions):
|
||||
self.current_view = actions['default']
|
||||
def __init__(self, parent, im_size, center, curr_view):
|
||||
self.current_view: ButtonInterface = curr_view
|
||||
self.long_press_threshold = 1000 # milliseconds
|
||||
self.left_press_start = None
|
||||
self.right_press_start = None
|
||||
@@ -17,9 +17,6 @@ class ButtonsManager(View):
|
||||
self.right_press_job = None
|
||||
self.both_press_job = None
|
||||
|
||||
for key, action in actions.items():
|
||||
setattr(self, key, action)
|
||||
|
||||
super().__init__(parent, im_size, center)
|
||||
|
||||
def init_ui(self, parent):
|
||||
|
||||
Reference in New Issue
Block a user