GoodMorningSunshine/clock.kv

257 lines
8.4 KiB
Plaintext

<MyClockWidget>:
on_pos: self.update_display()
on_size: self.update_display()
canvas:
Color:
rgb: root.theme.color_background
Rectangle:
size: self.size
pos: self.pos
FloatLayout
id: background
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: root.size
canvas:
Color:
rgb: root.theme.color_background
Rectangle:
size: self.size
pos: self.pos
FloatLayout
id: face_plate
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.9*min(root.size), 0.9*min(root.size)
canvas:
Color:
rgb: root.theme.color_shade
Ellipse:
size: self.size
pos: self.pos
Image:
id: icon_iaqi
size: 0.9*min(root.size), 0.9*min(root.size)
pos_hint: {"center_x": 0.5, "center_y": 0.36}
Image:
id: icon_uvi
size: 0.9*min(root.size), 0.9*min(root.size)
pos_hint: {"center_x": 0.5, "center_y": 0.64}
Image:
id: icon_pollen
size: 0.9*min(root.size), 0.9*min(root.size)
pos_hint: {"center_x": 0.42, "center_y": 0.5}
Image:
id: icon_aqi
size: 0.9*min(root.size), 0.9*min(root.size)
pos_hint: {"center_x": 0.58, "center_y": 0.5}
FloatLayout
id: face
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.9*min(root.size), 0.9*min(root.size)
FloatLayout
id: hands
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.9*min(root.size), 0.9*min(root.size)
FloatLayout
id: play_button
size_hint: None, None
pos_hint: {"center_x":0.1, "center_y":0.1}
size: 0.1*min(root.size), 0.1*min(root.size)
FloatLayout
id: set_alarm_button
size_hint: None, None
pos_hint: {"center_x":0.9, "center_y":0.1}
size: 0.1*min(root.size), 0.1*min(root.size)
FloatLayout
id: light_button
size_hint: None, None
pos_hint: {"center_x":0.124, "center_y":0.9}
size: 0.1*125/70*min(root.size), 0.1*min(root.size)
FloatLayout
id: settings_button
size_hint: None, None
pos_hint: {"center_x":0.9, "center_y":0.9}
size: 0.1*min(root.size), 0.1*min(root.size)
FloatLayout
id: settings_menu_background
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.8*min(root.size)
canvas:
Color:
rgb: root.theme.color_shade
Rectangle:
size: self.size
pos: self.pos
FloatLayout
id: settings_menu
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.7*min(root.size)
GridLayout:
rows: 9
cols: 2
pos_hint: {"center_x":0.5, "center_y":0.5}
Label:
text: "Volume"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_0
Slider:
id: volume_slider
min: 0
max: 20
value: 15
on_value: root.volume_slider_value(*args)
value_track: True
value_track_color: [1, 0, 0, 1]
Label:
text:"Wake up sound"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_1
Button:
id: settings_menu_wake_up_sound_select_button
on_press: root.settings_menu_wake_up_sound_select_button_cb()
font_size: root.height*0.05
color: root.theme.color_font
background_normal: ''
background_color: root.theme.color_button
Label:
text:"Wake up brightness"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_2
Slider:
id: wake_up_brightness_slider
min: 0
max: 20
value: 20
on_value: root.wake_up_brightness_slider_value(*args)
value_track: True
value_track_color: [1, 0, 0, 1]
Label:
text:"Reading light brightness"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_3
Slider:
id: reading_light_brightness_slider
min: 1
max: 20
value: 1
on_value: root.reading_light_brightness_slider_value(*args)
value_track: True
value_track_color: [1, 0, 0, 1]
Label:
text:"Display brightness"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_4
Slider:
id: display_brightness_slider
min: 0
max: 20
value: 10
on_value: root.display_brightness_slider_value(*args)
value_track: True
value_track_color: [1, 0, 0, 1]
Label:
text:"Theme"
halign: "left"
valign: "middle"
font_size: root.height*0.05
text_size: self.size
color: root.theme.color_font
id: settings_menu_label_5
Button:
id: settings_menu_theme_select_button
on_press: root.settings_menu_theme_select_button_cb()
font_size: root.height*0.05
text: str(root.theme.name)
color: root.theme.color_font
background_normal: ''
background_color: root.theme.color_button
FloatLayout
id: settings_menu_wake_up_sound_background
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.8*min(root.size)
canvas:
Color:
rgb: root.theme.color_shade
Rectangle:
size: self.size
pos: self.pos
FloatLayout
id: settings_menu_wake_up_sound
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.8*min(root.size)
BoxLayout:
orientation: "vertical"
pos_hint: {"center_x":0.5, "center_y":0.5}
id: settings_menu_wake_up_sound_boxlayout
Label:
text: "Select wake up sound"
font_size: root.height*0.05
color: root.theme.color_font
id: settings_menu_wake_up_sound_label_top
FloatLayout
id: settings_menu_theme_background
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.8*min(root.size)
canvas:
Color:
rgb: root.theme.color_shade
Rectangle:
size: self.size
pos: self.pos
FloatLayout
id: settings_menu_theme
size_hint: None, None
pos_hint: {"center_x":0.5, "center_y":0.5}
size: 0.8*min(root.size), 0.8*min(root.size)
BoxLayout:
orientation: "vertical"
pos_hint: {"center_x":0.5, "center_y":0.5}
id: settings_menu_theme_boxlayout
Label:
text: "Select theme"
font_size: root.height*0.05
color: root.theme.color_font
id: settings_menu_theme_label_top