添加style设置并更新版本号
Build and Publish / Run (push) Successful in 1m8s Details

This commit is contained in:
cxykevin 2024-04-26 11:19:10 +08:00
parent 9d3badf124
commit c9fe20dc78
3 changed files with 18 additions and 2 deletions

View File

@ -9,3 +9,4 @@ from magictk.frame import Frame, Container
from magictk.entry import Entry
from magictk.scrollbar import ScrollBar
from magictk.icon import Icon
from magictk.style import load_icon_pack, set_color_style

15
magictk/style.py Normal file
View File

@ -0,0 +1,15 @@
import pickle
from magictk import photoload
from magictk import color_tmpl
def set_color_style(color_set={}, **kwargs):
if color_set == {}:
color_tmpl.default_color.update(kwargs)
else:
color_tmpl.default_color.update(color_set)
def load_icon_pack(path):
with open(path, "rb") as file:
photoload.image_all.update(pickle.load(file))

View File

@ -3,7 +3,7 @@ import os
from setuptools import setup
####### config #######
VERSION = "0.0.2"
VERSION = "1.0.0"
######################
set_v = VERSION
@ -12,7 +12,7 @@ if (os.path.exists("runid.conf")):
runid = file.read()
set_v = set_v+"."+runid
else:
set_v = set_v+"."+"1000"
set_v = set_v+"."+"10000"
print("BUILD: version="+set_v)