start implementing edit_recipe

This commit is contained in:
Jannes Magnusson
2025-10-18 23:28:55 +02:00
parent 06df2e0e9b
commit eb32f089ad
12 changed files with 241 additions and 70 deletions

View File

@@ -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):