gcores theme update

This commit is contained in:
cuu 2019-05-05 13:45:16 +08:00
parent 423044f496
commit ee88a3170b
21 changed files with 59 additions and 59 deletions

View File

@ -329,7 +329,7 @@ class AboutPage(Page):
self._DrawOnce = True self._DrawOnce = True
if self._HWND != None: if self._HWND != None:
self._HWND.fill((255,255,255)) self._HWND.fill( MySkinManager.GiveColor("White") )
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) ) self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )

View File

@ -38,8 +38,9 @@ class ListPageSelector(InfoPageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h) ,0)
class PageListItem(InfoPageListItem): class PageListItem(InfoPageListItem):

View File

@ -37,9 +37,9 @@ class ListPageSelector(InfoPageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h) ,0)
class PageListItem(InfoPageListItem): class PageListItem(InfoPageListItem):
_PosX = 0 _PosX = 0

View File

@ -37,9 +37,10 @@ class ListPageSelector(InfoPageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h) ,0)
class PageListItem(InfoPageListItem): class PageListItem(InfoPageListItem):
_PosX = 0 _PosX = 0

View File

@ -67,7 +67,7 @@ class StoragePage(Page):
self._FreeLabel = Label() self._FreeLabel = Label()
self._FreeLabel.SetCanvasHWND(self._CanvasHWND) self._FreeLabel.SetCanvasHWND(self._CanvasHWND)
self._FreeLabel.Init("FREE",MySkinManager.GiveFont("Eurostile12")) self._FreeLabel.Init("FREE",MySkinManager.GiveFont("varela12"))
self._FreeLabel.SetColor(self._PctLabel._Color) self._FreeLabel.SetColor(self._PctLabel._Color)

View File

@ -50,7 +50,7 @@ class TimeLibStack:
return len(self.stack) return len(self.stack)
class ListPageSelector(PageSelector): class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front') _BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self): def __init__(self):
self._PosX = 0 self._PosX = 0
@ -73,9 +73,9 @@ class ListPageSelector(PageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class TimezoneListPage(Page): class TimezoneListPage(Page):

View File

@ -202,7 +202,7 @@ class WifiInfoPage(Page):
class WifiListSelector(PageSelector): class WifiListSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front') _BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self): def __init__(self):
pass pass
@ -222,9 +222,9 @@ class WifiListSelector(PageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width,h),0)
class WifiListMessageBox(Label): class WifiListMessageBox(Label):
_Parent = None _Parent = None

View File

@ -65,7 +65,7 @@ class ListPage(Page):
["","About", "About"], ["","About", "About"],
["","PowerOFF","Power off"], ["","PowerOFF","Power off"],
["","ButtonsLayout","Buttons Layout"], ["","ButtonsLayout","Buttons Layout"],
["","LauncherGo","Switch to LauncherGo"], #["","LauncherGo","Switch to LauncherGo"],
["","Lima","GPU driver switch"], ["","Lima","GPU driver switch"],
["","GateWay","Network gateway switch"]] ["","GateWay","Network gateway switch"]]

View File

@ -178,7 +178,7 @@ class MPDSpectrumPage(Page):
self._time2 = Label() self._time2 = Label()
self._time2.SetCanvasHWND(self._CanvasHWND) self._time2.SetCanvasHWND(self._CanvasHWND)
self._time2.Init("00:00-00:00", self._ListFont, self._time2.Init("00:00-00:00", self._ListFont,
MySkinManager.GiveColor('White')) MySkinManager.GiveColor('Text'))
self.Start() self.Start()
@ -336,7 +336,7 @@ class MPDSpectrumPage(Page):
if self._RollCanvas != None: if self._RollCanvas != None:
# self._RollCanvas.fill((111,22,33)) # self._RollCanvas.fill((111,22,33))
self._RollCanvas.fill(MySkinManager.GiveColor('Black')) self._RollCanvas.fill(MySkinManager.GiveColor('Text'))
if self._song_title._Width > self._RollW: if self._song_title._Width > self._RollW:
if (self._song_title._PosX + self._song_title._Width) > self._RollW and self._frames % 30 == 0: if (self._song_title._PosX + self._song_title._Width) > self._RollW and self._frames % 30 == 0:
self._song_title._PosX -= 1 self._song_title._PosX -= 1
@ -410,9 +410,9 @@ class MPDSpectrumPage(Page):
else: else:
self._capYPositionArray[i] = value self._capYPositionArray[i] = value
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0) pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0) pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
self._vis_values[i] -= 2 self._vis_values[i] -= 2

View File

@ -49,7 +49,7 @@ class MusicLibStack:
return len(self.stack) return len(self.stack)
class ListPageSelector(PageSelector): class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front') _BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self): def __init__(self):
self._PosX = 0 self._PosX = 0
@ -72,9 +72,9 @@ class ListPageSelector(PageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class MusicLibListPage(Page): class MusicLibListPage(Page):
@ -184,8 +184,8 @@ class MusicLibListPage(Page):
self._BGpng._ImgSurf = MyIconPool._Icons["empty"] self._BGpng._ImgSurf = MyIconPool._Icons["empty"]
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22")) self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela18"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled')) self._BGpng.SetLableColor(MySkinManager.GiveColor('Text'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0) self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)

View File

@ -23,7 +23,7 @@ from list_item import ListItem
import myvars import myvars
class ListPageSelector(PageSelector): class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front') _BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self): def __init__(self):
self._PosX = 0 self._PosX = 0
@ -51,9 +51,9 @@ class ListPageSelector(PageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, #aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor) # (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class PlayListPage(Page): class PlayListPage(Page):
@ -184,7 +184,7 @@ class PlayListPage(Page):
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18")) self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled')) self._BGpng.SetLableColor(MySkinManager.GiveColor('Text'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0) self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._Scroller = ListScroller() self._Scroller = ListScroller()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -31,7 +31,7 @@ class AboveAllPatch(Widget):
_FontObj= MyLangManager.TrFont("veramono20") _FontObj= MyLangManager.TrFont("veramono20")
_Parent =None _Parent =None
_Color = MySkinManager.GiveColor('Text') _Color = MySkinManager.GiveColor('Text')
_ValColor = MySkinManager.GiveColor('URL') _ValColor = MySkinManager.GiveColor('Text')
_CanvasHWND = None _CanvasHWND = None
_TextSurf = None _TextSurf = None
_Icons = {} _Icons = {}
@ -130,5 +130,6 @@ class SoundPatch(AboveAllPatch):
#w = 10,h = 40 #w = 10,h = 40
vol_rect = pygame.Rect(80+i*20, self._Height/2+20,10, 40) vol_rect = pygame.Rect(80+i*20, self._Height/2+20,10, 40)
aa_round_rect(self._CanvasHWND,vol_rect,MySkinManager.GiveColor("Front"),3,0,MySkinManager.GiveColor("Front")) pygame.draw.rect(self._CanvasHWND,self._ValColor,vol_rect,0)
#aa_round_rect(self._CanvasHWND,vol_rect,self._ValColor,3,0,self._ValColor)

View File

@ -24,7 +24,7 @@ class CounterScreen(FullScreen):
_NumberLabel = None _NumberLabel = None
_BGColor = MySkinManager.GiveColor('Black') _BGColor = MySkinManager.GiveColor('Black')
_FGColor = MySkinManager.GiveColor('White') _FGColor = MySkinManager.GiveColor('Text')
_Counting = False _Counting = False
_Number = 10 _Number = 10

View File

@ -73,8 +73,8 @@ class IconItem(Widget):
if self._ImgSurf == None and self._ImageName != "": if self._ImgSurf == None and self._ImageName != "":
# print(self._ImageName) # print(self._ImageName)
self._ImgSurf = pygame.image.load( self._ImageName ).convert_alpha() self._ImgSurf = pygame.image.load( self._ImageName ).convert_alpha()
if self._ImgSurf.get_width() > icon_width or self._ImgSurf.get_height() > icon_height: #if self._ImgSurf.get_width() > icon_width or self._ImgSurf.get_height() > icon_height:
self._ImgSurf = pygame.transform.scale(self._ImgSurf,(icon_width,icon_height)) # self._ImgSurf = pygame.transform.scale(self._ImgSurf,(icon_width,icon_height))
def ChangeImgSurfColor(self,color): def ChangeImgSurfColor(self,color):
color_surface(self._ImgSurf,color) color_surface(self._ImgSurf,color)

View File

@ -8,7 +8,7 @@ from UI.page import Page,PageSelector
from UI.skin_manager import MySkinManager from UI.skin_manager import MySkinManager
class InfoPageSelector(PageSelector): class InfoPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front') _BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self): def __init__(self):
self._Width = Width self._Width = Width
@ -25,5 +25,6 @@ class InfoPageSelector(PageSelector):
self._PosY = y self._PosY = y
self._Height = h self._Height = h
aa_round_rect(self._Parent._CanvasHWND, pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(self._PosX,self._PosY,self._Width-4,self._Height),0)
(self._PosX,self._PosY,self._Width-4,self._Height),self._BackgroundColor,4,0,self._BackgroundColor) #aa_round_rect(self._Parent._CanvasHWND,
# (self._PosX,self._PosY,self._Width-4,self._Height),self._BackgroundColor,4,0,self._BackgroundColor)

View File

@ -48,7 +48,7 @@ class KeyboardSelector(PageSelector):
if rect.width <=0 or rect.height <= 0 : if rect.width <=0 or rect.height <= 0 :
return return
aa_round_rect(self._Parent._CanvasHWND,rect, (126,206,244),3,0,(126,206,244)) aa_round_rect(self._Parent._CanvasHWND,rect, MySkinManager.GiveColor("Line"),3,0,MySkinManager.GiveColor("Line"))
# pygame.draw.rect(self._Parent._CanvasHWND,(0,0,0),rect,1) # pygame.draw.rect(self._Parent._CanvasHWND,(0,0,0),rect,1)
class Keyboard(Page): class Keyboard(Page):

View File

@ -648,6 +648,6 @@ class Page(Widget):
def Draw(self): def Draw(self):
self.ClearCanvas() self.ClearCanvas()
self.DrawIcons() self.DrawIcons()
#self.DrawPageSelector() self.DrawPageSelector()

View File

@ -14,7 +14,7 @@ class ListScroller(object):
_Height = 0 _Height = 0
_MinHeight = 6 ## tested _MinHeight = 6 ## tested
_Parent = None _Parent = None
_Color = MySkinManager.GiveColor('Front') _Color = MySkinManager.GiveColor('Line')
_StartX = 0 _StartX = 0
_StartY = 0 _StartY = 0
@ -60,4 +60,5 @@ class ListScroller(object):
def Draw(self): def Draw(self):
start_rect = midRect(self._PosX+self._StartX,self._StartY+self._Value,self._Width,self._Height,self._Parent._Width,self._Parent._Height) start_rect = midRect(self._PosX+self._StartX,self._StartY+self._Value,self._Width,self._Height,self._Parent._Width,self._Parent._Height)
aa_round_rect(self._CanvasHWND,start_rect, self._Color,3,0, self._Color) #aa_round_rect(self._CanvasHWND,start_rect, self._Color,3,0, self._Color)
pygame.draw.rect(self._CanvasHWND,self._Color,start_rect,0)

View File

@ -54,21 +54,16 @@ class SkinManager(object):
fonts_path["Eurostile"] = "%s/EurostileMN-Medium.pfb.ttf" %skinpath fonts_path["Eurostile"] = "%s/EurostileMN-Medium.pfb.ttf" %skinpath
fonts_path["EurostileBold"] = "%s/EurostileMN-ExtendedBold.pfb.ttf" % skinpath fonts_path["EurostileBold"] = "%s/EurostileMN-ExtendedBold.pfb.ttf" % skinpath
self._Fonts["Eurostile10"] = pygame.font.Font(fonts_path["Eurostile"],10)
self._Fonts["Eurostile11"] = pygame.font.Font(fonts_path["Eurostile"],11)
self._Fonts["Eurostile12"] = pygame.font.Font(fonts_path["Eurostile"],12)
self._Fonts["Eurostile13"] = pygame.font.Font(fonts_path["Eurostile"],13)
self._Fonts["EurostileBold13"] = pygame.font.Font(fonts_path["EurostileBold"],13)
self._Fonts["EurostileBold13"] = pygame.font.Font(fonts_path["EurostileBold"],13)
self._Fonts["EurostileBold30"] = pygame.font.Font(fonts_path["EurostileBold"],30) self._Fonts["EurostileBold30"] = pygame.font.Font(fonts_path["EurostileBold"],30)
for i in range(10,29): for i in range(10,29):
self._Fonts["varela%d"%i] = pygame.font.Font(fonts_path["varela"],i) self._Fonts["varela%d"%i] = pygame.font.Font(fonts_path["Eurostile"],i)
self._Fonts["varela34"] = pygame.font.Font(fonts_path["varela"],34) self._Fonts["varela34"] = pygame.font.Font(fonts_path["Eurostile"],34)
self._Fonts["varela40"] = pygame.font.Font(fonts_path["varela"],40) self._Fonts["varela40"] = pygame.font.Font(fonts_path["Eurostile"],40)
self._Fonts["varela120"] = pygame.font.Font(fonts_path["varela"],120) self._Fonts["varela120"] = pygame.font.Font(fonts_path["Eurostile"],120)
for i in range(10,26): for i in range(10,26):
self._Fonts["veramono%d"%i] = pygame.font.Font(fonts_path["veramono"],i) self._Fonts["veramono%d"%i] = pygame.font.Font(fonts_path["veramono"],i)
@ -86,9 +81,9 @@ class SkinManager(object):
Colors["High"] = pygame.Color(51, 166, 255) Colors["High"] = pygame.Color(51, 166, 255)
Colors["Text"] = pygame.Color(42, 140, 121) Colors["Text"] = pygame.Color(42, 140, 121)
Colors["ReadOnlyText"] = pygame.Color(130,130,130) Colors["ReadOnlyText"] = pygame.Color(130,130,130)
Colors["Front"] = pygame.Color(131, 199, 219) Colors["Front"] = pygame.Color(42,140,121)
Colors["URL"] = pygame.Color(51, 166, 255) Colors["URL"] = pygame.Color(51, 166, 255)
Colors["Line"] = pygame.Color(42, 140, 121) Colors["Line"] = pygame.Color(21, 70, 60)
Colors["TitleBg"] = pygame.Color(11, 16, 22) Colors["TitleBg"] = pygame.Color(11, 16, 22)
Colors["Active"] = pygame.Color(175, 90, 0) Colors["Active"] = pygame.Color(175, 90, 0)
Colors["Inactive"] = pygame.Color(27,78,72) Colors["Inactive"] = pygame.Color(27,78,72)

View File

@ -10,7 +10,7 @@ Battery = "/sys/class/power_supply/axp20x-battery/uevent"
MPD_socket = "/tmp/mpd.socket" MPD_socket = "/tmp/mpd.socket"
UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI/master/launcher_ver.json" UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI/master/launcher_gcores_ver.json"
VERSION="gcores stable 1.0" VERSION="gcores stable 1.0"