From 3bd7b5501071f7d5c429c916c04492eda34aea30 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 12 May 2019 18:23:44 +0200 Subject: [PATCH] Fixed readability issue --- Calendar/Epd7in5bAdapter.py | 2 +- Calendar/HourListDesign.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Calendar/Epd7in5bAdapter.py b/Calendar/Epd7in5bAdapter.py index 2338f4e..379fab4 100644 --- a/Calendar/Epd7in5bAdapter.py +++ b/Calendar/Epd7in5bAdapter.py @@ -63,7 +63,7 @@ class Epd7in5bAdapter (EpdAdapter): def __prepare_image__(self, image): buffer = np.array(image) r,g = buffer[:,:,0], buffer[:,:,1] - buffer[np.logical_and(r > 240, g > 240)] = [255,255,255] + buffer[np.logical_and(r > 220, g > 220)] = [255,255,255] buffer[r > g] = [255,0,0] buffer[r != 255] = [0,0,0] return buffer diff --git a/Calendar/HourListDesign.py b/Calendar/HourListDesign.py index d139509..b6e43b5 100644 --- a/Calendar/HourListDesign.py +++ b/Calendar/HourListDesign.py @@ -2,7 +2,7 @@ from DesignEntity import DesignEntity from settings import hours, language from TextDesign import TextDesign from PIL import ImageDraw -from Assets import colors, defaultfontsize +from Assets import colors, defaultfontsize, fonts from BoxDesign import BoxDesign from datetime import timedelta, datetime @@ -17,6 +17,8 @@ event_title_ypadding = 5 line_thickness = 1 currenttimeline_thickness = 2 +event_title_font = fonts['bold'] + class HourListDesign (DesignEntity): """Hours of a day are listed vertically and resemble a timeline.""" @@ -144,7 +146,7 @@ class HourListDesign (DesignEntity): text = event.title text_color = colors["bg"] textbox_size = (size[0] - event_title_xpadding, size[1] - event_title_ypadding) - txt = TextDesign(textbox_size, text = text, fontsize=event_title_fontsize, color=text_color, background_color=box_color, wrap=True) + txt = TextDesign(textbox_size, text = text, font=event_title_font, fontsize=event_title_fontsize, color=text_color, background_color=box_color, wrap=True) txt.mask = False txt.pos = (pos[0] + event_title_xpadding, pos[1] + event_title_ypadding) self.draw_design(txt)