update soundpage

This commit is contained in:
cuu 2018-12-18 19:25:00 +08:00
parent b81416a93c
commit 517ac01bc7
2 changed files with 8 additions and 10 deletions

View File

@ -113,7 +113,6 @@ class SoundPage(Page):
self._Height = self._Screen._Height
self._MySlider = SoundSlider()
self._MySlider._Parent = self
self._MySlider.SetCanvasHWND(self._CanvasHWND)
@ -123,19 +122,19 @@ class SoundPage(Page):
self._MySlider.Init()
try:
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
self._MySlider.SetValue(0)
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
self._MySlider.SetValue(0)
def OnLoadCb(self):
try:
try:
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
except Exception,e:
print(str(e))
def WhenSliderDrag(self,value): ##value 0-100
if value < 0 or value > 100:

View File

@ -178,7 +178,6 @@ def RestoreLastBackLightBrightness(main_screen):
f.truncate()
f.close()
if main_screen._CounterScreen._Counting==True:
main_screen._CounterScreen.StopCounter()
main_screen.Draw()