Files
kawai-focus/kv/timers_screen.kv
T

89 lines
2.6 KiB
Plaintext

#:kivy 2.3.1
#:include kv/navigation_panel.kv
# Кастомная панель для каждого таймера
<ExpansionPanelItem>:
MDExpansionPanelHeader:
MDListItem:
theme_bg_color: "Custom"
md_bg_color: self.theme_cls.surfaceContainerLowColor
ripple_effect: False
MDListItemSupportingText:
text: root.title
TrailingPressedIconButton:
id: chevron
icon: "chevron-right"
on_release: app.tap_expansion_chevron(root, chevron)
MDExpansionPanelContent:
orientation: "vertical"
padding: "12dp", 0, "12dp", "12dp"
md_bg_color: self.theme_cls.surfaceContainerLowColor
adaptive_height: True
MDLabel:
text: "Информация о таймере"
adaptive_height: True
padding: "16dp", "12dp"
MDListItem:
theme_bg_color: "Custom"
md_bg_color: self.theme_cls.surfaceContainerLowColor
ripple_effect: False
on_release: None
MDListItemLeadingIcon:
icon: "information-outline"
MDListItemHeadlineText:
text: root.info
MDBoxLayout:
padding: [8, 8, 0, 0]
spacing: 8
size_hint_y: None
height: self.minimum_height
MDButton:
timer_id: root.timer_id
style: "outlined"
size_hint_x: 1
on_release: app.root.get_screen("timers_screen").switch_timer(self)
MDButtonText:
text: "Открыть"
# MDButton:
# timer_id: root.id
# style: "outlined"
# size_hint_x: 1
# MDButtonText:
# text: "Редактировать"
# MDButton:
# timer_id: root.id
# style: "outlined"
# size_hint_x: 1
# MDButtonText:
# text: "Удалить"
# Основной экран
<TimersScreen>:
NavigationPanel:
MDScreen:
md_bg_color: self.theme_cls.secondaryContainerColor
ScrollView:
size_hint_x: .9
pos_hint: {"center_x": .5, "center_y": .5}
do_scroll_x: False
do_scroll_y: True
MDList:
id: container
spacing: "8dp"
padding: [56, 8, 56, 0] # [слева, сверху, справа, снизу]