Some improvements
Added dictionary containing the positions of the rows for the Agenda-View. Added a second seperator (seperator2) which is used by the Agenda View. Added support for relative path instead of explicit path (Credit to Max. G.)
This commit is contained in:
		| @@ -8,8 +8,12 @@ It also contains the positions of these icons on the E-Paper display | |||||||
| from PIL import Image | from PIL import Image | ||||||
| from settings import language | from settings import language | ||||||
| im_open = Image.open | im_open = Image.open | ||||||
|  | import os | ||||||
|  |  | ||||||
|  | path = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/") | ||||||
|  | if path != "" and path[-1] != "/": | ||||||
|  |     path += "/" | ||||||
|  |  | ||||||
| path = '/home/pi/Inky-Calendar/Calendar/' |  | ||||||
| wpath = path+'weather-icons/' | wpath = path+'weather-icons/' | ||||||
| mpath = path+'translations/'+language+'/months/' | mpath = path+'translations/'+language+'/months/' | ||||||
| weekpath = path+'translations/'+language+'/week/' | weekpath = path+'translations/'+language+'/week/' | ||||||
| @@ -20,6 +24,7 @@ weekday = im_open(opath+'weekday.png') | |||||||
| eventicon = im_open(opath+'event.png') | eventicon = im_open(opath+'event.png') | ||||||
| dateicon = im_open(opath+'today.png') | dateicon = im_open(opath+'today.png') | ||||||
| seperator = im_open(opath+'seperator.jpeg') | seperator = im_open(opath+'seperator.jpeg') | ||||||
|  | seperator2 = im_open(opath+'seperator2.jpeg') | ||||||
| tempicon = im_open(opath+'temperature.jpeg') | tempicon = im_open(opath+'temperature.jpeg') | ||||||
| humicon = im_open(opath+'humidity.jpeg') | humicon = im_open(opath+'humidity.jpeg') | ||||||
| weekmon = im_open(weekpath+'week-mon.jpeg') | weekmon = im_open(weekpath+'week-mon.jpeg') | ||||||
| @@ -42,6 +47,21 @@ windiconspace = (79, 0) | |||||||
| sunriseplace = (214, 0) | sunriseplace = (214, 0) | ||||||
| sunsetplace = (214, 35) | sunsetplace = (214, 35) | ||||||
|  |  | ||||||
|  | col = 0 | ||||||
|  | agenda_view_lines = { | ||||||
|  |     'line1': (col, 75), 'line2': (col, 100), | ||||||
|  |     'line3': (col, 125), 'line4': (col, 150), | ||||||
|  |     'line5': (col, 175), 'line6': (col, 200), | ||||||
|  |     'line7': (col, 225), 'line8': (col, 250), | ||||||
|  |     'line9': (col, 275), 'line10': (col, 300), | ||||||
|  |     'line11': (col, 325), 'line12': (col, 350), | ||||||
|  |     'line13': (col, 375), 'line14': (col, 400), | ||||||
|  |     'line15': (col, 425), 'line16': (col, 450), | ||||||
|  |     'line17': (col, 475), 'line18': (col, 500), | ||||||
|  |     'line19': (col, 525), 'line20': (col, 550), | ||||||
|  |     'line21': (col, 575), 'line22': (col, 600), | ||||||
|  |     } | ||||||
|  |  | ||||||
| rss_places = { | rss_places = { | ||||||
|     'line_1' : (0, 490), 'line_2' : (0, 515), 'line_3' : (0, 540), |     'line_1' : (0, 490), 'line_2' : (0, 515), 'line_3' : (0, 540), | ||||||
|     'line_4' : (0, 565), 'line_5' : (0, 590), 'line_6' : (0, 615) |     'line_4' : (0, 565), 'line_5' : (0, 590), 'line_6' : (0, 615) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user