feat: added swich for timers_screen; refactor: commented out the non-working code and stubs
This commit is contained in:
@@ -9,6 +9,15 @@ class MenuApp:
|
||||
|
||||
menu: MDDropdownMenu = None
|
||||
|
||||
def switch_screen(self, item) -> None:
|
||||
"""Переключает экран"""
|
||||
|
||||
screen_manager = self.root
|
||||
|
||||
match item.text:
|
||||
case 'Таймеры':
|
||||
screen_manager.current = 'timers_screen'
|
||||
|
||||
def open_menu(self, menu_button) -> None:
|
||||
"""Открывает выпадающее меню"""
|
||||
|
||||
@@ -18,7 +27,7 @@ class MenuApp:
|
||||
'Цвет темы': lambda: self.set_palette(),
|
||||
'Стиль темы': lambda: self.switch_theme(),
|
||||
'Тип схемы': lambda: self.set_scheme_type(),
|
||||
'Новый таймер': None
|
||||
# 'Новый таймер': None
|
||||
}.items():
|
||||
menu_items.append(
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
id: timers_nav
|
||||
icon: "timer-outline"
|
||||
text: "Таймеры"
|
||||
on_release: app.switch_screen(self)
|
||||
|
||||
CommonNavigationRailItem:
|
||||
id: guide_nav
|
||||
|
||||
@@ -54,21 +54,21 @@
|
||||
MDButtonText:
|
||||
text: "Открыть"
|
||||
|
||||
MDButton:
|
||||
timer_id: root.id
|
||||
style: "outlined"
|
||||
size_hint_x: 1
|
||||
# MDButton:
|
||||
# timer_id: root.id
|
||||
# style: "outlined"
|
||||
# size_hint_x: 1
|
||||
|
||||
MDButtonText:
|
||||
text: "Редактировать"
|
||||
# MDButtonText:
|
||||
# text: "Редактировать"
|
||||
|
||||
MDButton:
|
||||
timer_id: root.id
|
||||
style: "outlined"
|
||||
size_hint_x: 1
|
||||
# MDButton:
|
||||
# timer_id: root.id
|
||||
# style: "outlined"
|
||||
# size_hint_x: 1
|
||||
|
||||
MDButtonText:
|
||||
text: "Удалить"
|
||||
# MDButtonText:
|
||||
# text: "Удалить"
|
||||
|
||||
# Основной экран
|
||||
<TimersScreen>:
|
||||
|
||||
Reference in New Issue
Block a user