2019-03-10 15:07:27 +01:00
|
|
|
from EventListDesign import EventListDesign
|
|
|
|
from settings import hours
|
2019-04-05 11:37:51 +02:00
|
|
|
from Assets import fonts, defaultfontsize, colors
|
2019-04-07 12:54:34 +02:00
|
|
|
from TextFormatter import event_prefix_str_sum
|
2019-03-10 15:07:27 +01:00
|
|
|
|
2019-03-10 15:54:46 +01:00
|
|
|
font = fonts["regular"]
|
2019-03-10 15:07:27 +01:00
|
|
|
|
2019-07-13 08:05:35 +02:00
|
|
|
|
2019-03-10 15:07:27 +01: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)
|