Skip to content

Commit

Permalink
Improvements to dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbarnes committed Sep 16, 2021
1 parent 91032d7 commit 01349d1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions screens/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ def reload(self):
text = str(self.weather.weather.current.sky_text)
self.text(text, font_size=14, position=(150, 20))

self.line((0, 60, self.image.size[0], 60), width=1)

start = self.calendar.standardize_date(self.calendar.events[0]["start"])
text = self.calendar.humanized_datetime(start)
self.text(text, font_size=16, position=(5, 60))
self.text(text, font_size=16, position=(5, 65))

if len(self.calendar.events) > 0:
text = str(self.calendar.events[0]['summary'])
self.text(text, font_size=14, position=(5, 85), max_lines=2)

self.line((0, 120, self.image.size[0], 120), width=1)

text = str(self.calendar.events[0]['summary'])
self.text(text, font_size=14, position=(5, 80))
if len(self.calendar.tasks) > 0:
text = str(self.calendar.tasks[0]['summary'])
self.text(text, font_size=14, position=(5, 125), max_lines=2)

def handle_btn_press(self, button_number=1):
if button_number == 0:
Expand Down

0 comments on commit 01349d1

Please sign in to comment.