added coloured background options

This commit is contained in:
langolierz
2018-05-02 22:06:27 +00:00
parent 8141073fc1
commit b1cf071e1b
3 changed files with 36 additions and 5 deletions

View File

@@ -231,6 +231,25 @@ class Data(object):
else:
return False
def get_background_colour(self):
colour_name = self.settings['video']['BACKGROUND_COLOUR']['value']
colour_argb = (255,0,0,0)
if colour_name == "black":
colour_argb = (255,0,0,0)
elif colour_name == "white":
colour_argb = (255,255,255,255)
elif colour_name == "green":
colour_argb = (255,0,255,0)
elif colour_name == "blue":
colour_argb = (255,0,0,255)
elif colour_name == "pink":
colour_argb = (255,255,0,255)
elif colour_name == "none":
colour_argb = (0,0,0,0)
colour_hex = '%02x%02x%02x%02x' % colour_argb
print(colour_hex)
return colour_hex
@staticmethod
def _get_mb_free_diskspace(path):
st = os.statvfs(path)