Merge pull request #126 from cuu/master

notifications bug fix
This commit is contained in:
GNU 2018-12-14 18:36:38 +08:00 committed by GitHub
commit 36c9ab6b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
import platform
import pygame import pygame
import glob import glob
#import math #import math
@ -101,6 +102,9 @@ class NotificationPage(Page):
Page.__init__(self) Page.__init__(self)
self._Icons = {} self._Icons = {}
if "arm" in platform.machine():
os.system( "git config --global core.filemode false" )
def GenList(self): def GenList(self):
self._MyList = [] self._MyList = []
@ -110,7 +114,7 @@ class NotificationPage(Page):
start_x = 10 start_x = 10
start_y = 0 start_y = 0
counter = 0
for i,v in enumerate( files_path): for i,v in enumerate( files_path):
filename, file_extension = os.path.splitext(v) filename, file_extension = os.path.splitext(v)
alias_file = filename + ".alias" alias_file = filename + ".alias"
@ -119,7 +123,7 @@ class NotificationPage(Page):
li = NotifyJobListItem() li = NotifyJobListItem()
li._Parent = self li._Parent = self
li._PosX = start_x li._PosX = start_x
li._PosY = start_y + i*InfoPageListItem._Height li._PosY = start_y + counter*InfoPageListItem._Height
li._Width = Width-10 li._Width = Width-10
li._Fonts["normal"] = self._ListFontObj li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = fonts["varela12"] li._Fonts["small"] = fonts["varela12"]
@ -140,7 +144,7 @@ class NotificationPage(Page):
##li.SetSmallText( v ) ##li.SetSmallText( v )
self._MyList.append(li) self._MyList.append(li)
counter += 1
def Init(self): def Init(self):
if self._Screen != None: if self._Screen != None:

View File

@ -1 +1 @@
Low Battery Warning Low Battery