Added remaining UI color changes

This commit is contained in:
Adam Shaw
2018-08-06 23:35:52 -05:00
parent 47570323d8
commit 544aafa959
30 changed files with 116 additions and 80 deletions

View File

@@ -10,6 +10,7 @@ from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.util_funcs import midRect
from UI.skin_manager import SkinManager
# a item for List
# - - - - - - - - - - - --
@@ -31,7 +32,7 @@ class ListItemIcon(IconItem):
class ListItemLabel(Label):
_ActiveColor = pygame.Color(175,90,0)
_ActiveColor = SkinManager().GiveColor('Active')
_Active = False
def Draw(self):
@@ -116,7 +117,7 @@ class ListItem(object):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,SkinManager().GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
if self._Playing == True:
self._Labels["Text"]._Active =True
@@ -127,7 +128,7 @@ class ListItem(object):
if self._PlayingProcess > 0:
seek_posx = int(self._Width * self._PlayingProcess/100.0)
pygame.draw.line(self._Parent._CanvasHWND,(255,169,169),(self._PosX,self._PosY+self._Height-2),(self._PosX+seek_posx,self._PosY+self._Height-2),2)
pygame.draw.line(self._Parent._CanvasHWND,SkinManager().GiveColor('Active'),(self._PosX,self._PosY+self._Height-2),(self._PosX+seek_posx,self._PosY+self._Height-2),2)
else:
self._Labels["Text"].Draw()

View File

@@ -20,6 +20,7 @@ from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.icon_item import IconItem
from UI.icon_pool import MyIconPool
from UI.skin_manager import SkinManager
from threading import Thread
@@ -82,7 +83,7 @@ class MPDSpectrumPage(Page):
_SongFont = fonts["notosanscjk12"]
_PIFI = None
_FIFO = None
_Color = pygame.Color(126,206,244)
_Color = SkinManager().GiveColor('Front')
_GobjectIntervalId = -1
_Queue = None
_KeepReading = True
@@ -162,21 +163,22 @@ class MPDSpectrumPage(Page):
self._song_title = Label()
self._song_title.SetCanvasHWND(self._RollCanvas)
self._song_title.Init("Untitled",self._SongFont,(255,255,255))
self._song_title.Init("Untitled",self._SongFont,SkinManager().GiveColor('White'))
self._title = Label()
self._title.SetCanvasHWND(self._CanvasHWND)
self._title.Init("Title:",self._ListFont,(255,255,255))
self._title.Init("Title:",self._ListFont,SkinManager().GiveColor('White'))
self._time = Label()
self._time.SetCanvasHWND(self._CanvasHWND)
self._time.Init("Time:",self._ListFont,(255,255,255))
self._time.Init("Time:",self._ListFont,SkinManager().GiveColor('White'))
self._time2 = Label()
self._time2.SetCanvasHWND(self._CanvasHWND)
self._time2.Init("00:00-00:00",self._ListFont,(255,255,255))
self._time2.Init("00:00-00:00", self._ListFont,
SkinManager().GiveColor('White'))
self.Start()
@@ -227,7 +229,7 @@ class MPDSpectrumPage(Page):
def ClearCanvas(self):
self._CanvasHWND.fill((0,0,0))
self._CanvasHWND.fill(SkinManager().GiveColor('Black'))
def SgsSmooth(self):
passes = 1
@@ -341,7 +343,7 @@ class MPDSpectrumPage(Page):
if self._RollCanvas != None:
# self._RollCanvas.fill((111,22,33))
self._RollCanvas.fill((0,0,0))
self._RollCanvas.fill(SkinManager().GiveColor('Black'))
if self._song_title._Width > self._RollW:
if (self._song_title._PosX + self._song_title._Width) > self._RollW and self._frames % 30 == 0:
self._song_title._PosX -= 1
@@ -415,9 +417,9 @@ class MPDSpectrumPage(Page):
else:
self._capYPositionArray[i] = value
pygame.draw.rect(self._CanvasHWND,(255,255,255),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,SkinManager().GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,(255,255,255),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
pygame.draw.rect(self._CanvasHWND,SkinManager().GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
self._vis_values[i] -= 2

View File

@@ -15,6 +15,7 @@ from UI.keys_def import CurKeys
from UI.multi_icon_item import MultiIconItem
from UI.icon_pool import MyIconPool
from UI.scroller import ListScroller
from UI.skin_manager import SkinManager
from list_item import ListItem
@@ -48,7 +49,7 @@ class MusicLibStack:
return len(self.stack)
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = SkinManager().GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -184,7 +185,7 @@ class MusicLibListPage(Page):
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("Please upload data over Wi-Fi", fonts["varela22"])
self._BGpng.SetLableColor(pygame.Color(204,204,204))
self._BGpng.SetLableColor(SkinManager().GiveColor('Disabled'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)

View File

@@ -14,6 +14,7 @@ from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.icon_pool import MyIconPool
from UI.skin_manager import SkinManager
from UI.scroller import ListScroller
@@ -22,7 +23,7 @@ from list_item import ListItem
import myvars
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = SkinManager().GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -183,7 +184,7 @@ class PlayListPage(Page):
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("my favourites", fonts["varela18"])
self._BGpng.SetLableColor(pygame.Color(204,204,204))
self._BGpng.SetLableColor(SkinManager().GiveColor('Disabled'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._Scroller = ListScroller()