misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-14 19:26:23 +02:00
parent 6b42e48dff
commit 9625cf1122
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

View File

@ -46,7 +46,7 @@ def papirus(config, layout):
layout['status'] = {
'pos': (int(layout['width'] / 2) - 15, int(layout['height'] * .15)),
'font': fonts.Medium,
'max': (layout['width'] - layout['status'][0]) // 6
'max': (layout['width'] - layout['status']['pos'][0]) // 6
}
return layout
@ -71,7 +71,7 @@ def oledhat(config, layout):
layout['status'] = {
'pos': (int(layout['width'] / 2) - 15, int(layout['height'] * .15)),
'font': fonts.Medium,
'max': (layout['width'] - layout['status'][0]) // 6
'max': (layout['width'] - layout['status']['pos'][0]) // 6
}
return layout
@ -118,7 +118,7 @@ def waveshare(config, layout):
layout['status'] = {
'pos': (125, 20),
'font': fonts.Medium,
'max': (layout['width'] - layout['status'][0]) // 6
'max': (layout['width'] - layout['status']['pos'][0]) // 6
}
return layout