General improvements
Added 2 more lines for events below the Calendar which is utilised when there is free space below the monthly Calendar.
This commit is contained in:
		| @@ -1,7 +1,12 @@ | ||||
| #!/usr/bin/python3 | ||||
| # -*- coding: utf-8 -*- | ||||
| from PIL import Image, ImageFont | ||||
| from settings import * | ||||
| """ | ||||
| This file contains all the locations of the icons used. | ||||
| It also contains the positions of these icons on the E-Paper display | ||||
| """ | ||||
|  | ||||
| from PIL import Image | ||||
| from settings import language | ||||
| im_open = Image.open | ||||
|  | ||||
| path = '/home/pi/E-Paper-Master/Calendar/' | ||||
| @@ -23,6 +28,9 @@ no_response=    im_open(opath+'cloud-no-response.jpeg') | ||||
| sunriseicon = im_open(opath+'wi-sunrise.jpeg') | ||||
| sunseticon = im_open(opath+'wi-sunset.jpeg') | ||||
| windicon = im_open(opath+'wi-strong-wind.jpeg') | ||||
| black = im_open(opath+'black.jpeg') | ||||
| white = im_open(opath+'white.jpeg') | ||||
| red = im_open(opath+'red.jpeg') | ||||
|  | ||||
| wiconplace = (0, 0) | ||||
| tempplace = (299, 0) | ||||
| @@ -37,19 +45,22 @@ sunsetplace = (214, 35) | ||||
| e_col = 70 | ||||
| date_col = 0 | ||||
|  | ||||
| e_row_1 = 540 | ||||
| e_row_2 = 565 | ||||
| e_row_3 = 590 | ||||
| e_row_4 = 615 | ||||
| e_row_1 = 490 | ||||
| e_row_2 = 515 | ||||
| e_row_3 = 540 | ||||
| e_row_4 = 565 | ||||
| e_row_5 = 590 | ||||
| e_row_6 = 615 | ||||
|  | ||||
| event_positions = { | ||||
|     'e1': (e_col, e_row_1), 'e2': (e_col, e_row_2), 'e3': (e_col, e_row_3), | ||||
| 'e4': (e_col, e_row_4) | ||||
|     'e4': (e_col, e_row_4), 'e5': (e_col, e_row_5), 'e6': (e_col, e_row_6) | ||||
| } | ||||
|  | ||||
| date_positions = { | ||||
| 'd1': (date_col, e_row_1), 'd2': (date_col, e_row_2), 'd3': (date_col, e_row_3), | ||||
| 'd4': (date_col, e_row_4) | ||||
|     'd1': (date_col, e_row_1), 'd2': (date_col, e_row_2), | ||||
|     'd3': (date_col, e_row_3), 'd4': (date_col, e_row_4), | ||||
|     'd5': (date_col, e_row_5), 'd6': (date_col, e_row_6) | ||||
| } | ||||
|  | ||||
| col1 = 3 | ||||
| @@ -101,8 +112,6 @@ weekdayssun = { | ||||
|     'Sat': (col7, week_row) | ||||
|     } | ||||
|  | ||||
|  | ||||
|  | ||||
| weathericons = { | ||||
|     '01d': 'wi-day-sunny', '02d':'wi-day-cloudy', '03d': 'wi-cloudy', | ||||
|     '04d': 'wi-cloudy-windy', '09d': 'wi-showers', '10d':'wi-rain', | ||||
| @@ -111,4 +120,5 @@ weathericons = { | ||||
|     '03n': 'wi-night-cloudy', '04n': 'wi-night-cloudy', | ||||
|     '09n': 'wi-night-showers', '10n':'wi-night-rain', | ||||
|     '11n':'wi-night-thunderstorm', '13n':'wi-night-snow', | ||||
| '50n': 'wi-night-alt-cloudy-windy'} | ||||
|     '50n': 'wi-night-alt-cloudy-windy' | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user