E-Paper-Calendar/Calendar/SingelDayEventListDesign.py

16 lines
942 B
Python
Raw Normal View History

from EventListDesign import EventListDesign
from settings import hours
2019-04-05 11:37:51 +02:00
from Assets import fonts, defaultfontsize, colors
from TextFormatter import event_prefix_str_sum
font = fonts["regular"]
2019-07-13 08:05:35 +02:00
class SingelDayEventListDesign (EventListDesign):
"""Specialized event list for day list design."""
2019-07-13 08:05:35 +02:00
def __init__(self, size, events, font_size=defaultfontsize, line_spacing=0, event_prefix_rel_dates=[], col_spacing=5, general_color=colors["fg"], background_color=colors["bg"], highlight_color=colors["hl"]):
def prefix_func(x, rel_date): return event_prefix_str_sum(x, rel_date)
super().__init__(size, events, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_rel_dates=event_prefix_rel_dates,
event_prefix_func=prefix_func, font_family=font, show_more_info=True, general_color=general_color, background_color=background_color, highlight_color=highlight_color)