Added options for spacing

This commit is contained in:
Maximilian Giller 2019-03-10 15:19:15 +01:00
parent 0a6d0ed2b1
commit b4b8898b2e

View file

@ -1,14 +1,13 @@
from EventListDesign import EventListDesign
from settings import hours
eventlist_colspacing = 5
eventlist_allday_char = ""
class SingelDayEventListDesign (EventListDesign):
"""Specialized event list for day list design."""
def __init__ (self, size, calendar, date, font_size = 16):
def __init__ (self, size, calendar, date, font_size = 16, line_spacing=2, col_spacing=5):
prefix_func = lambda x : self.__get_event_prefix__(x)
super().__init__(size, calendar, filter_date=date, text_size=font_size, event_prefix_func=prefix_func, col_spacing=eventlist_colspacing)
super().__init__(size, calendar, filter_date=date, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_func=prefix_func)
def __get_event_prefix__ (self, event):
if event.allday: