Implemented line_thickness setting in all designs
This commit is contained in:
parent
d8a1c1c250
commit
2a94c1fb90
8 changed files with 16 additions and 14 deletions
|
@ -4,8 +4,9 @@ from datetime import datetime, date, timedelta
|
|||
from TableDesign import TableDesign
|
||||
from PIL import ImageDraw, ImageFont
|
||||
from TextFormatter import date_summary_str, event_prefix_str
|
||||
from settings import line_thickness
|
||||
|
||||
separator_width = 1
|
||||
separator_width = line_thickness
|
||||
|
||||
class AgendaListDesign (DesignEntity):
|
||||
'''Lists upcoming events in chronological order and groups them by days'''
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
from PanelDesign import PanelDesign
|
||||
from AgendaListDesign import AgendaListDesign
|
||||
from WeatherHeaderDesign import WeatherHeaderDesign
|
||||
from settings import general_settings
|
||||
from settings import general_settings, line_thickness
|
||||
from PIL import ImageDraw
|
||||
from Assets import colors
|
||||
from RssPostListDesign import RssPostListDesign
|
||||
|
||||
agenda_ypadding = 5
|
||||
weatherheader_height = 0.113
|
||||
seperator_width = 3
|
||||
seperator_width = line_thickness
|
||||
infolist_size = (1, 0.24)
|
||||
infolist_padding = 2
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ from PanelDesign import PanelDesign
|
|||
from datetime import datetime, timedelta, date
|
||||
from DayHeaderDesign import DayHeaderDesign
|
||||
from HourListDesign import HourListDesign
|
||||
from settings import general_settings
|
||||
from settings import general_settings, line_thickness
|
||||
from RssPostListDesign import RssPostListDesign
|
||||
from PIL import ImageDraw
|
||||
from Assets import colors
|
||||
|
@ -13,7 +13,7 @@ hourlist_size = (1, 1 - header_size[1])
|
|||
default_shownhours_count = 12
|
||||
|
||||
infoarea_replaced_hours = 4
|
||||
infoarea_borderline_width = 1
|
||||
infoarea_borderline_width = line_thickness
|
||||
infoarea_padding = 5
|
||||
|
||||
class DayViewPanel (PanelDesign):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from DesignEntity import DesignEntity
|
||||
from settings import hours, language
|
||||
from settings import hours, language,line_thickness
|
||||
from TextDesign import TextDesign
|
||||
from PIL import ImageDraw
|
||||
from Assets import colors, defaultfontsize, fonts
|
||||
|
@ -14,8 +14,8 @@ hoursubtext_height = 0.45
|
|||
event_title_fontsize = defaultfontsize
|
||||
event_title_xpadding = 3
|
||||
event_title_ypadding = 5
|
||||
line_thickness = 1
|
||||
currenttimeline_thickness = 2
|
||||
line_thickness = line_thickness
|
||||
currenttimeline_thickness = line_thickness
|
||||
|
||||
event_title_font = fonts['bold']
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from EllipseDesign import EllipseDesign
|
|||
from MonthBlockDesign import MonthBlockDesign, daynumberboxsize
|
||||
from EventListDesign import EventListDesign
|
||||
from RssPostListDesign import RssPostListDesign
|
||||
from settings import general_settings
|
||||
from settings import general_settings, line_thickness
|
||||
|
||||
weatherheadersize = (1,0.113)
|
||||
monthboxsize = (1, 0.085)
|
||||
|
@ -110,7 +110,7 @@ class MonthOvPanel (PanelDesign):
|
|||
|
||||
def __draw_seperator__ (self):
|
||||
"""Draw a line seperating the weather and Calendar section"""
|
||||
ImageDraw.Draw(self.__image__).line([ self.__abs_pos__(seperatorplace), self.__abs_pos__((1, seperatorplace[1])) ], fill='red', width=5)
|
||||
ImageDraw.Draw(self.__image__).line([ self.__abs_pos__(seperatorplace), self.__abs_pos__((1, seperatorplace[1])) ], fill='red', width=line_thickness)
|
||||
|
||||
def __draw_month_name__ (self):
|
||||
"""Draw the icon with the current month's name"""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from PanelDesign import PanelDesign
|
||||
from settings import general_settings, week_starts_on
|
||||
from settings import general_settings, week_starts_on, line_thickness
|
||||
from PIL import ImageDraw
|
||||
from datetime import date
|
||||
from Assets import colors
|
||||
|
@ -12,7 +12,7 @@ from WeatherHeaderDesign import WeatherHeaderDesign
|
|||
weather_height = 0.113
|
||||
info_height = 0.25
|
||||
info_padding = 5
|
||||
seperator_width = 3
|
||||
seperator_width = line_thickness
|
||||
|
||||
class MonthViewPanel (PanelDesign):
|
||||
"""Displays a grid of the day of the current month
|
||||
|
|
|
@ -26,8 +26,8 @@ update_interval = 60
|
|||
"""DESIGN"""
|
||||
font_size = 14 # does not affect every text
|
||||
font_boldness = "semibold" # extralight, light, regular, semibold, bold, extrabold
|
||||
line_thickness = 1 #1-3 Thickness advised // Default = 1 // day-list view only!
|
||||
choosen_design = "month-overview" # month-overview, day-list, day-view, agenda-list, month-view
|
||||
line_thickness = 1 # 1-3 Thickness advised
|
||||
general_settings = { # General settings that designs may use
|
||||
"info-area" : "rss", # empty, events, rss
|
||||
"highlight-event-days" : True,
|
||||
|
|
|
@ -86,7 +86,8 @@ Once the packages are installed, navigate to the home directory, open 'E-Paper-M
|
|||
| --- | --- |
|
||||
| font_size | Varies the size of the font. Can be any number >0. In some cases the size of the font is fixed by the design. Default value is `14`. |
|
||||
| font_boldness | Varies the boldness of the font. Can be one of `extralight`, `light`, `regular`, `semibold`, `bold` or `extrabold`. In some cases the boldness of the font is fixed by the design. Default value is `regular`. |
|
||||
| choosen_design | Sets the desired panel design. Can be one of `month-overview` or `day-list`. |
|
||||
| choosen_design | Sets the desired panel design. |
|
||||
| line_thickness | Varies the boldness of separation lines in the choosen design. |
|
||||
| general_settings | A dictionary containing options that some designs use to optimize there design. Possible options are as follows: |
|
||||
| `"info-area"` | Defines the content type of an additionaly info area on the design. Can be one of `"rss"`, `"events"` or empty, to remove this area or keep it clean. |
|
||||
| `"highlight-event-days"` | If set to `True`, days with events are highlighted in contrast to days without events. |
|
||||
|
|
Loading…
Reference in a new issue