Files
kawai-focus/kv/timer_constructor_screen.kv

146 lines
4.4 KiB
Plaintext

#:kivy 2.3.1
<TimerConstructorScreen>:
FloatLayout:
# поле вовода "название"
TextInput:
id: title
size_hint: None, None
size: 220, 30
pos_hint: {"center_x": 0.5, "center_y": 0.9}
hint_text: "название"
Label:
id: title_error
text: ""
color: (1, 0.3, 0.3, 1)
font_size: 14
size_hint_y: None
height: 20
pos_hint: {"center_x": 0.5, "center_y": 0.8}
# числовой счётчик "время помидора"
Label:
text: "помидор"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.7}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.7}
on_press: time_tomato_input.decrement()
TimeTomatoInput:
id: time_tomato_input
disabled: True
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.7}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.7}
on_press: time_tomato_input.increment()
# числовой счётчик "время прерыва"
Label:
text: "перерыв"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.6}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.6}
on_press: time_break_input.decrement()
TimeBreakInput:
id: time_break_input
disabled: True
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.6}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.6}
on_press: time_break_input.increment()
# числовой счётчик "время длительного перерыва"
Label:
text: "перерывище"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.5}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.5}
on_press: time_long_break_input.decrement()
TimeLoongBreakInput:
id: time_long_break_input
disabled: True
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.5}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.5}
on_press: time_long_break_input.increment()
# числовой счётчик "колличество помидоров"
Label:
text: "помидоров"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.4}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.4}
on_press: count_tomatos_input.decrement()
CountTomatosInput:
id: count_tomatos_input
disabled: True
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.4}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.4}
on_press: count_tomatos_input.increment()
# Кнопка "Создать"
Button:
text: 'Создать'
size_hint: None, None
height: 40
width: 100
pos_hint: {'center_x': 0.7, 'center_y': 0.1}
on_press: root.create_timer(self)
# Кнопка "Назад"
Button:
text: 'Назад'
size_hint: None, None
height: 40
width: 100
pos_hint: {'center_x': 0.3, 'center_y': 0.1}
on_press: root.back(self)